Hi I have two use cases I would like some advice on.
1.) If I stop an actor - and create an actor with the same name, what is the behavior of ActorSelection
?
In the documentation it says
ActorSelection
on the other hand points to the path (or multiple paths if wildcards are used) and is completely oblivious to which incarnation is currently occupying it.ActorSelection
cannot be watched for this reason. It is possible to resolve the current incarnation’sActorRef
living under the path by sending anIdentify
message to theActorSelection
which will be replied to with anActorIdentity
containing the correct reference (see ActorSelection). This can also be done with theresolveOne
method of theActorSelection
, which returns aFuture
of the matchingActorRef
.
So does this mean if you do ActorSelection on the newly created actor (with the old name) it may point to the original UID, and any further tell
will result in dead letters?
- While using
system.actorSelection()
is there a way to throw error if the actor at the path does not exist?