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].
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.