Re: [akka-user] PersistentActor initialization best practices

2014-09-24 Thread sinel
Thanks Jeroen, that helped me finally realize what I was misunderstanding. Somehow it got stuck in my mind that the extracted id corresponded to the persistence id, hence my confusion. Now, when I went back to the docs and read it once more, the curtain lifted and I finally saw the comment in

Re: [akka-user] PersistentActor initialization best practices

2014-09-23 Thread sinel
Hi, Even though it has been about a month since the last comment in this thread, I will add my question here since I think it is a direct continuation of this discussion. I want to follow up on Jeroen’s comment. I am facing the same problem of figuring out how pass instance-specific props

Re: [akka-user] PersistentActor initialization best practices

2014-09-23 Thread Jeroen Gordijn
Hi Sinan, The name of the actor that is created in the cluster is stable and can be used as persistenceId, In the Example the name of parent concatenated with the entityId is used. You could as wel create the id yourself like: 1. def persistenceId = orders- + self.path.name This way

Re: [akka-user] PersistentActor initialization best practices

2014-08-18 Thread Jeroen Gordijn
Hi, I guess that a downside of 3 is that it makes it less suitable to use in ClusterSharding (in ClusterSharding you cannot pass instance specific props to an actor). So my preference (especially with domain actors) is to create the actor and initialize it with a command. All domain

Re: [akka-user] PersistentActor initialization best practices

2014-08-14 Thread Patrik Nordwall
Hi Sander, Alternative 3 sounds attractive, but instead of persisting in the constructor I would do it when RecoveryCompleted is received http://doc.akka.io/docs/akka/2.3.5/scala/persistence.html#Recovery_status. I have not tried it. Let us know if it is working. Regards, Patrik On Thu, Aug