Я пытаюсь использовать метод Source.actorRef для создания объекта akka.stream.scaladsl.Source. Что-то вроде формы
import akka.stream.OverflowStrategy.fail
import akka.stream.scaladsl.Source
case class Weather(zip : String, temp : Double, raining : Boolean)
val weatherSource = Source.actorRef[Weather](Int.MaxValue, fail)
val sunnySource = weatherSource.filter(!_.raining)
...
Мой вопрос: как отправить данные на исходный объект на основе ActorRef?
Я предположил, что отправка сообщений в Источник была чем-то вроде
//does not compile
weatherSource ! Weather("90210", 72.0, false)
weatherSource ! Weather("02139", 32.0, true)
Но weatherSource
не имеет оператора !
или tell
.
Документация не слишком описательна в отношении использования Source.actorRef, она просто говорит, что вы можете...
Заранее благодарю за ваш отзыв и ответ.