Scala akka ActorFor way

Here is my code to search for an actor on my remote system:

Application.system.actorFor("akka:// ActorApplication@172.17.100.232 :2552/home/louis/scala/remoteActor") 

I think I pointed the wrong way.

Is it correct:

/ home / louis / scala /

Is the location Play! project on a remote server. And then "remoteActor" is the name if the actor.

But it never returns an ActorRef object, it is always null.

+1
source share
1 answer

no, the address should be:

 "akka:// ActorApplication@172.17.100.232 :2552/user/remoteActor" 

This suggests that ActorApplication indeed the correct name for the actor system you are trying to access: 2552. The /user/ indicates that this is the actor you created on this system. (you are a "user")

+2
source

All Articles