Relative Content

Tag Archive for scalaakka-stream

How to create akka source that is materialized to ActorRef in which the incoming messages know the sender

val ref = Source.actorRef[String]( completionMatcher = PartialFunction.empty, failureMatcher = PartialFunction.empty, 100000, OverflowStrategy.dropNew ).to(Sink.foreachAsync(1){ elem => // how to reply to sender Future.successful() }) Above is example that does nearly what I need, with the exception that the underlying message does not know the sender. So it’s impossible to reply. Is there a way or pattern […]