I don't see a way to do that with consistent hashing routers. Perhaps you can use Cluster Sharding <http://doc.akka.io/docs/akka/2.3.12/contrib/cluster-sharding.html> instead?
Regards, Patrik On Thu, Jul 16, 2015 at 5:01 PM, Henning Els <[email protected]> wrote: > I make use of a cluster configuration with consistent hashing routing. > > One of my actors represents a physical resource, and messages from the > resource to the actor are routed using consistent hashing. Thanks to this > configuration, the actor is highly available. > > The question that now arises is when this actor needs to listen for events > in the cluster using the DistributedPubSubMediator. Given that this actor > might've traveled between nodes (based on cluster changes) I may have one > of these running on multiple machines. I'd like only the active actor, > i.e. the actor to which messages would currently be forwarded to, to react > to the events. > > Is there a way that this actor can check if it is the consistent hash > target, without sending a message to the router and allowing the router to > route the message? I.e. I'm hoping to find a library call that I can pass > the message to, and have it return the node to which it would be forwarded > to. > > This is currently done in Java, although any advice will be helpful. > > Thanks in advance. > > -- > >>>>>>>>>> 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.
