yes that's how we have done it before using cluster sharding - per processor type e.g.: Account we had a "CommandHandler" e.g.: AccountCommandHandler which was responsible to create and route:
val account = context.child(accountId) getOrElse createAccountProcessor(accountId) account forwardMsg cmd hth, michael On Thursday, 24 April 2014 15:55:52 UTC+2, erich oliphant wrote: > > Hi, I'm playing around with akka-persistence, and one thing that's not > clear to me is the best way to 1) Handle the command that might create an > instance of a particular event processor (e.g. CreateOrder(...)) 2) Route > commands to the proper instance of the created eventsourced processor (e.g. > SubmitOrderForProcessing(id:27,...)) > > I've not seen anything in the examples, etc that handles this particular > case. Any suggestions for a 'command gateway/handler' or something > patterns that might be the a way to approach this? > -- >>>>>>>>>> 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.
