That’s perfectly possible. Yet you have to be careful to not close over any mutable actor state, e.g. vars, ActorContext, sender(), etc. A good way to avoid that is define the flow graph via a method in the companion object of your actor.
Heiko -- Heiko Seeberger Home: heikoseeberger.de <http://heikoseeberger.de/> Twitter: @hseeberger <https://twitter.com/hseeberger> Public key: keybase.io/hseeberger <https://keybase.io/hseeberger> > On 14 Nov 2015, at 03:55, Gary Struthers <[email protected]> wrote: > > I have a flow graph that needs initialization and post processing. I'd like > to do this within an actor. The actor receives a message, the flow graph is > initialized, then the message is passed to it, then its result is sent to > different actors. I don't see this use case in the docs so I don't know if > this is fine or problematic. > > Gary > > -- > >>>>>>>>>> Read the docs: http://akka.io/docs/ <http://akka.io/docs/> > >>>>>>>>>> Check the FAQ: > >>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html > >>>>>>>>>> <http://doc.akka.io/docs/akka/current/additional/faq.html> > >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user > >>>>>>>>>> <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] > <mailto:[email protected]>. > To post to this group, send email to [email protected] > <mailto:[email protected]>. > Visit this group at http://groups.google.com/group/akka-user > <http://groups.google.com/group/akka-user>. > For more options, visit https://groups.google.com/d/optout > <https://groups.google.com/d/optout>. -- >>>>>>>>>> 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.
