You can use actorSelection. It is a bit complicated to use, though. I find the easiest way is to keep track of the actorRefs you create. Basically you create your actorRef once (during initialization of your controller for example) and store it as a val.

If this does not work for any reason, you can still look up the actor using actorSelection. The actor has to be created first though in order to be retrieved by actorSelection. ActorSelection can look up the actor by the path, and returns an ActorSelection object, which you can send an Identify message to. There is a resolveOne method which will return you a Future with the ActorRef which is much simpler to use, but I think it is only available in Akka 2.2.1. Here is the documentation for actorSelection

Related Query

More Query from same tag