Just to clarify: are there any plans to add support for custom actor processors inside Flow DSL(e.g. *Flow(Props[ProcessorActor])*) in near future? I believe that this feature is quite important.
On Friday, March 27, 2015 at 11:56:59 AM UTC+3, Patrik Nordwall wrote: > > Perhaps you can use mapAsync and ask the actor, instead of > using ActorSubscriber, ActorPublisher? > > Later, there will be an AsyncStage that might be useful. > > /Patrik > > On Mon, Mar 23, 2015 at 6:56 PM, <[email protected] <javascript:>> > wrote: > >> Hi! I would like to use custom actor which implements ActorPublisher and >> ActorSubscriber as a stage in Flow and pass it to HTTP >> connection.handleWith. However I can't find any references how to achieve >> this and currently I'm using something like this: >> >> val createProcessor = (system: ActorSystem) => { >> val processorRef = system.actorOf(Props[ProcessorActor]) >> val sub = Sink (ActorSubscriber[HttpRequest] (processorRef) ) >> val pub = Source (ActorPublisher[HttpResponse] (processorRef) ) >> Flow () (b => (b.add(sub), b.add(pub))) >> } >> >> and call this function for each incoming connection. >> >> Are there any better alternatives or this approach is ok? >> >> Thanks in advance! >> >> -- >> >>>>>>>>>> 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] <javascript:>. >> To post to this group, send email to [email protected] >> <javascript:>. >> 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 > > -- >>>>>>>>>> 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.
