Scala akka ActorFor path

烈酒焚心 提交于 2019-12-24 10:59:40

问题


Here is my code for finding an actor on my remote system:

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

I think I have the wrong path specified.

Is this correct:

/home/louis/scala/

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

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


回答1:


no, the address should likely be:

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

This assumes that ActorApplication is indeed the correct name for the actor system you are trying to access on :2552. The /user/ portion of the url indicates it is a actor you created in that system. (you being the "user")



来源:https://stackoverflow.com/questions/12568088/scala-akka-actorfor-path

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!