So I'm using Akka Actors to create an indexing queue that manages a pool of 
indexing tasks in my Java application. My preStart method contains this 
code to initialize the child actors that perform indexing.

for (int x = 0; x < NUM_TASKS; x++){

   ActorRef task  = Akka.system().actorOf(Props.create(IndexingTask.class), 
"Task" + x);

   availableTasks.add(task);

}

There was a bug or problem that caused my indexingQueue to restart. When it 
tried to restart, I got the following error from the above code:

akka.actor.InvalidActorNameException: actor name [Task0] is not unique!

So I went and read the docs and I found this

> Termination of an actor proceeds in two steps: first the actor suspends 
> its mailbox processing and sends a stop command to all its children, then 
> it keeps processing the internal termination notifications from its 
> children *until the last one is gone, finally terminating itself*


Emphasis mine. Just wondering if this is wrong or am I completely 
misunderstanding what the naming of an actor represents? The naming is 
unimportant, I can increment a static long because I never need to 
reference these actors by name. My main concern is that there are orphan 
actors hanging around in my application. 

-- 
>>>>>>>>>>      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