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://[email protected]: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.