Hi Thomas (& everyone else),
as a general rule of thumb always use ActorRef. The exceptions to this rule are
- sending via the AtLeastOnceDelivery trait
- initiating first contact between remote systems
In all other cases you’ll have ActorRefs readily available by virtue of setting up the system of actors in proper hierarchical fashion, passing references from parent to child and introducing actors by sending messages containing ActorRefs.
The first exception is due to at-least-once semantics being radically different from normal message sends, which means that ActorRef is not the right thing. The second exception is obviously due to not having an ActorRef before a reply is received from the remote system.
We should probably add this to the docs.
Regards,
Roland