I think I understand it better from what you said. I guess I don't have separate parent for each group therefore I was looking to see how to group the child actors but anyways since it is not the standard approach from what you are saying I would not go that way. I believe I can leverage event bus <http://doc.akka.io/docs/akka/current/java/event-bus.html> for this since all I want to do is broadcast different messages to different groups of actors within a single JVM.
Is it recommended to have multiple actors systems within the same JVM? I am using the Play framework and it has a default Actor system but I wondering if I should use Actor system provided by the Play framework or create my own to leverage event bus? I am assuming the different between pub-sub and event bus is one is distributed and other is not respectively. isn't it? Thanks for your time kant On Tue, Mar 21, 2017 at 2:39 PM, Justin du coeur <[email protected]> wrote: > Not sure I understand the desired use case, but I believe the answer is no > -- the *path* of an Actor has to be unique. That is, for a given parent, > only one child may have a given name. > > Is there a reason not to just have the parent maintain separate lists of > the different groups? You seem to be trying to find a built-in solution to > a problem that folks usually just solve manually (because it is usually > extremely easy to do so). > > On Tue, Mar 21, 2017 at 4:18 PM, kant kodali <[email protected]> wrote: > >> Can two actors have the same name? For Example, Can I create same >> instance of Actor class in a For loop so I can access all the actors by >> that name? >> >> On Tue, Mar 21, 2017 at 6:12 AM, Justin du coeur <[email protected]> >> wrote: >> >>> Right -- that's probably the way I would tend to construct something >>> like this, but it would depend on the use case, as well as whether the >>> "groups" in question were mutually exclusive... >>> >>> On Tue, Mar 21, 2017 at 9:05 AM, Konrad Malawski < >>> [email protected]> wrote: >>> >>>> >>>> As such, no -- there's no formal "group" concept like this, although >>>> you could construct it manually yourself. >>>> >>>> There is "all children of given actor" which is accessible by >>>> context.children() inside an Actor. >>>> >>>> >>>> >>>> >>>> -- >>>> Konrad `ktoso` Malawski >>>> Akka <http://akka.io> @ Lightbend <http://lightbend.com> >>>> >>>> >>>> On 21 March 2017 at 15:02:26, Justin du coeur ([email protected]) >>>> wrote: >>>> >>> >>> -- >>> >>>>>>>>>> Read the docs: http://akka.io/docs/ >>> >>>>>>>>>> Check the FAQ: http://doc.akka.io/docs/akka/c >>> urrent/additional/faq.html >>> >>>>>>>>>> Search the archives: https://groups.google.com/grou >>> p/akka-user >>> --- >>> You received this message because you are subscribed to a topic in the >>> Google Groups "Akka User List" group. >>> To unsubscribe from this topic, visit https://groups.google.com/d/to >>> pic/akka-user/UAFqhZYk8uc/unsubscribe. >>> To unsubscribe from this group and all its topics, send an email to >>> [email protected]. >>> To post to this group, send email to [email protected]. >>> Visit this group at https://groups.google.com/group/akka-user. >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> -- >> >>>>>>>>>> Read the docs: http://akka.io/docs/ >> >>>>>>>>>> Check the FAQ: http://doc.akka.io/docs/akka/c >> urrent/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 https://groups.google.com/group/akka-user. >> For more options, visit https://groups.google.com/d/optout. >> > > -- > >>>>>>>>>> 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 a topic in the > Google Groups "Akka User List" group. > To unsubscribe from this topic, visit https://groups.google.com/d/ > topic/akka-user/UAFqhZYk8uc/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > To post to this group, send email to [email protected]. > Visit this group at https://groups.google.com/group/akka-user. > For more options, visit https://groups.google.com/d/optout. > -- >>>>>>>>>> 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 https://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
