"Should the PersistentId be different for all the different actors? Like "order-number-1", "order-number-2" etc... to "order-number-1000""
Yes, if you choose to use several actors. One does not, in general, have multiple persistent actors with the same persistence identifier. On Friday, June 26, 2015 at 4:25:41 AM UTC+1, wonderful world wrote: > > My question is around the *PersistenceId* which need to be overridden in > every PersistentActor. > > A persistent actor must have an identifier that doesn't change across >> different actor incarnations. The identifier must be defined with the >> persistenceId method. > > > I have an *OrderActor* which receives commands. I modified this > OrderActor to be a *OrderPersistentActor *to persist all the events*. *The > Persistence is working for a single actor. > > I may have hundreds of Orders which needs to be available for processing > at any time. They all receive commands. My plan is to create as many number > of *OrderPersistentActor *, but not sure about what I should have for the > *PersistenceId*? Should the PersistentId be different for all the > different actors? Like "order-number-1", "order-number-2" etc... to > "order-number-1000" Or it should be same like "order-actor" for all the > hundreds of actors? > > > -- >>>>>>>>>> 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.
