Is there a way to add some kind of payload (attached message) while sending a message to an akka actor? I know there is a way to do this using routers, but can this be achieved by simple message passing?
By simple message passing, I mean something like this remoteActor ! "hi".
Yes, yes you can. You can send any payload you want but it has to be immutable (as far as i know). Most of people use case class-es. For example.
then you can do as follows
but you hve to remember to create appropriate case in receive