On Tue, May 27, 2014 at 12:24 AM, Jeroen Gordijn <[email protected]>wrote:
> Hi Patrik, > > This makes sense. I am using event sourcing in some places to ensure that > some action is performed (channels will be removed/changed right). In > preStart I send a message to self to restart processing. The actor rebuilds > its state after which it will receive the restart processing message and it > sends out pending messages. > > Is sending this restart message to self the best method? Or did you use > another method? > Yes, sending a message to self is a good way to perform something when recovery has completed, but be aware of that other messages sent to the actor from the outside may arrive before your start message. For me that was not a problem. You can solve that by stashing all incoming messages until your start message is handled. We will support this use case better when ticket 13944<https://github.com/akka/akka/issues/13944> has been fixed. /Patrik > Cheers, > Jeroen > > -- > >>>>>>>>>> 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 <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 [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.
