>From the documentation on stopping actors:

Since stopping an actor is asynchronous, you cannot immediately reuse the 
> name of the child you just stopped; this will result in an 
> InvalidActorNameException. Instead, watch the terminating actor and 
> create its replacement in response to the Terminated message which will 
> eventually arrive.
>
http://doc.akka.io/docs/akka/2.3.9/scala/actors.html#Stopping_actors

On Wednesday, February 11, 2015 at 10:58:58 PM UTC+7, Kane Lai wrote:
>
> Hi,
>
> I'm trying to manually restart the akka hierarchy because I'm implementing 
> something like hot-reload config mechanism.
> I send a Kill to a top level actor and set the supervisor strategy for 
> ActorKilledException to Restart. Everything works fine so far.
> Then during restart, in the top level actor constructor I recreate the 
> child actors like this. Then the InvalidActorNameException is seen. May I 
> know what's the usual practice to handle this? How could I recreate and 
> name the reborn child actors?
> Thanks.
>
> val worker =
>   context.actorOf(
>     TcpServerWorker.props(
>       self,
>       config.operationSetConfig.tcpListenHost.get,
>       config.operationSetConfig.tcpListenPort.get),
>     "tcpServer")
>
>
> Kane
>

-- 
>>>>>>>>>>      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 [email protected].
To post to this group, send email to [email protected].
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