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
ActorSelectionon 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.ActorSelectioncannot be watched for this reason. It is possible to resolve the current incarnation’sActorRefliving under the path by sending anIdentifymessage to theActorSelectionwhich will be replied to with anActorIdentitycontaining the correct reference (see ActorSelection). This can also be done with theresolveOnemethod of theActorSelection, which returns aFutureof 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?