Akka Typed sender() workaround

Is it possible to get the sender() inside Behavior for interop with classic actors, when I can’t send the sender with a message.
For example, in ActorSink.actorRef[Message](actor, Message)

That is not possible, you have to change the message to include a replyTo/sender field.

If the interaction is not performance sensitive you could perhaps introduce an intermediate classic actor which puts sender() in a field in a new message.

1 Like