简体   繁体   中英

Akka Remote Actor - actorSelection failed to be remote

I am building an API service on Scala that should call a remote actor for a specific microservice.

Documentation talks about that:

val remoteSelection = context.system.actorSelection("akka.tcp://RemoteSystem@127.0.1.1:2552/user/EmailActor").resolveOne()

However, when I implement it on my code, I always get the current local ActorSystem as below:

Failure(akka.actor.ActorNotFound: Actor not found for: ActorSelection[Anchor(akka://LocalSystem/deadLetters)

where LocalSystem is the previous ActorSystem that I used.

Can anyone help me please?

Thanks

The error does say that there is no actor with this path in this system. Are you sure that this actor is created before calling it?

You could log its path when it is created ( println(self.path) ) to verify this.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM