one question, if I have 5 persistence actor instances they belong to the same 
Class, do they conflict each other when persist data or recover data?

Don’t do that!

One actor = one persistentId = one "persistent entity”.

There must not be multiple writers to one persistentId.
The example I’ve shown above is for a quick/dirty test that recovery actually 
kicks in, NOT for production code!

In your app I would recommend keeping an registry of some kind (very easy to 
implement with an actor, with a Map[Id, ActorRef] for example), and/or actor 
selection, to guarantee this invariant holds. 

If you think about it business wise, it also makes sense - a persistentId 
represents one “real world thingy”.
If you need multiple representations of one persistentId identified thingy, you 
would use `PersistentViews` - which do not perform writes, so it’s safe.

I hope this helps, and sorry for the example that was tempting into such use 
case :-)

-- 
Konrad 'ktoso' Malawski
hAkker @ typesafe
http://akka.io

-- 
>>>>>>>>>>      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.

Reply via email to