Hi Eduardo, The ClusterSharding extension supports configuration of one role to use a subset of nodes, but that is not what you are looking for. Instead of using the ClusterSharding extension you may start the actors yourself and thereby specify the roles. See: ShardCoordinatorSupervisor.props ShardCoordinator.props ShardRegion.props
Note that the ShardCoordinatorSupervisor is supposed be started with a ClusterSingletonManager. See here: https://github.com/akka/akka/blob/v2.3.3/akka-contrib/src/main/scala/akka/contrib/pattern/ClusterSharding.scala#L360 Cheers, Patrik On Fri, May 30, 2014 at 1:20 PM, Eduardo Fernandes <edu...@gmail.com> wrote: > Hi all. > > Probably this is a silly question but I couldn't find any clear answer in > the group or docs. > > Suppose I have a cluster with 4 nodes with 2 roles (2 node instances per > role). How could I create two shardings, each one sending messages to the > nodes belonging to a particular role? The idea is add a new node with a > particular role and let the cluster sharding distribute the work among all > nodes belonging to that role. I suppose I could create two sharding > regions, one per role, and assign the sharding to a role in some way? > > I'm using Java and Akka 2.3.3. > > Many thanks for your help. > > Eduardo. > > > -- > >>>>>>>>>> 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 akka-user+unsubscr...@googlegroups.com. > To post to this group, send email to akka-user@googlegroups.com. > 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 <http://typesafe.com/go-reactive-activator-contest> -- >>>>>>>>>> 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 akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.