Reading http://doc.akka.io/docs/akka/snapshot/general/addressing.html, 
"Reusing Actor Paths", I would agree with you:

It may be the right thing to do in very specific circumstances, but make 
sure
to confine the handling of this precisely to the actor’s supervisor, because
that is the only actor which can reliably detect proper deregistration of 
the
name, before which creation of the new child will fail.

I have, however, observed the same as you, and have stopped using readable 
names for my actors... :-(

I am also eager for a clarification!

Best regards,

Anders Båtstrand

torsdag 23. april 2015 18.54.02 UTC+2 skrev Dragisa Krsmanovic følgende:
>
> I have a test that does something like this:
>
>   "test" in {
>       val actorName: String = UUID.randomUUID.toString
>       val eventActor = system.actorOf(Props(new EventActor(...)), name = 
> actorName)
>  
>       watch(eventActor) // receive message if actor terminates
>       
>       // do something
>  
>       system.stop(eventActor)
>  
>       // wait for actor to properly terminate
>       expectTerminated(eventActor, waitTime)
>  
>       // On slow test server:
>       // akka.actor.InvalidActorNameException: actor name 
> [d7bd90a2-4518-4012-9ba4-409b5010c2c5] is not unique!
>       val eventActor2 = system.actorOf(Props(new EventActor(...)), name = 
> actorName)
>  
>     }
>
>
> Intermittently, I get InvalidActorNameException in the last line when I 
> try to create actor the second time. Isn't expectTerminated supposed to 
> guarantee that actor name is available again ?
>
>
> Thanks,
> Dragisa
>
>

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to