That sounds like an exotic combination of RoundRobinPool and PersistentActor. Would be interesting to understand the underlying use case for that (I'm just curios, not saying that it is wrong).
You can use the generated actor name (qualified with some prefix) as persistenceId. For local routees it will be "c1", "c2", "c3", ... For remote routees it will be the $a, $b, $c names The actor name is retrieved with context.path.name Cheers, Patrik On Fri, Jul 4, 2014 at 9:00 AM, <[email protected]> wrote: > Hi Malawski , > > Thanks very much for your quick answer. > Actually, in my project I want to use Akka router(RoundRobinPool ) for my > customized persistence actor. So it will face the issue of multi-actors > with the same Class type. > So what should I do if I need to use the RoundRobinPool for the > persistence actor? What should I do and how to make the persistenceId are > different for all the persistence actors in the pool? > > > > > > On Thursday, July 3, 2014 9:11:13 PM UTC+8, Konrad Malawski wrote: >> >> Whoops, I thought this question was in the https://groups.google.com/ >> forum/#!topic/akka-user/RZrLVIKPPEg (unit-testing persistent actor >> recovery) thread. >> >> To clarify what I meant above, since it’s also relevant - the same class >> is fine. What you do not want to have is multiple persistent actors with >> the same persistentId. >> >> It’s *OK* to have 5 actors of the class UserWallet if each of them has a >> *different* persistenceId (“wallet-12”, “wallet-23”, …). >> It’s *not OK* if they would have the same persistenceId - that will >> break things, there must be always one "writer" (PersistentActor) for a >> given persistenceId. >> >> — konrad >> >> > -- > >>>>>>>>>> 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.
