On Thu, Aug 14, 2014 at 1:11 PM, roo zoog <[email protected]> wrote:
> hello, > > i am new to akka, exuse if this question is trivial. > > within UntypedActor.onReceive with MessageUp I would like to send a > message to all members of the cluster or to the member who joined the > cluster. > > The tell method is only implemented for ActorRef. How can one get a > ActorRef for the corresponding MemberUp.member() ? or is there another way > to send a message to that member ? > You can use ActorSelection, as illustrated in the register method of this example: http://doc.akka.io/docs/akka/2.3.5/java/cluster-usage.html#Worker_Dial-in_Example Note that you send messages to actors, running in the ActorSystem of the cluster member. You don't send messages to the member. > > Is there a way to send a message to all members of a cluster ? I tried > Cluster.clusterCore().tell but this does not send a message to all members > of the cluster. > You can use pub/sub: http://doc.akka.io/docs/akka/2.3.5/contrib/distributed-pub-sub.html Cheers, Patrik > -- > >>>>>>>>>> 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. > -- Patrik Nordwall Typesafe <http://typesafe.com/> - Reactive apps on the JVM Twitter: @patriknw -- >>>>>>>>>> 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.
