[akka-user] [akka-streams] ActorSubscriber to ActorPublisher flow -- how to?

2015-08-20 Thread Alexey Shuksto
Hello there, I could not find answer to this particular question neither in docs nor in this group: Is it possible to wire Sink.actorSubscriber(...) into Source.actorPublisher(...) in one (Partial-) Flow? And by 'wire' I mean to somehow send message from ActorSubscriber, instantiated from give

Re: [akka-user] [akka-streams] ActorSubscriber to ActorPublisher flow -- how to?

2015-08-20 Thread Konrad Malawski
Hello there Alexey, I'm not sure I understand what you want to achieve, is it simply to connect such Sink to the Source? That's simply: Source.actorPublisher(...).to(Sink.actorSubscriber(...)).run() Or do you mean to put another processing stage between them? If so then read about custom processi

Re: [akka-user] [akka-streams] ActorSubscriber to ActorPublisher flow -- how to?

2015-08-20 Thread Alex Shuksto
Well, I want to simply connect them, but I want to connect Sink .actorSubscriber(...) ~> Source.actorPublisher(...), not other way around, like you said. I've got Actor, that enriches HTTP Requests that our server receives. After some enrichment, I need to be able to send request further down for

Re: [akka-user] [akka-streams] ActorSubscriber to ActorPublisher flow -- how to?

2015-08-21 Thread Alexey Shuksto
Well, I was able to achieve needed behavior with following flow scheme: Flow() { implicit builder ⇒ val promises = builder add Source(() ⇒ Iterator continually Promise[O]()) val fan = builder add Broadcast[Promise[O]](2) val zip = builder add Zip[I, Promise[O]]() val flow = builder add F

Re: [akka-user] [akka-streams] ActorSubscriber to ActorPublisher flow -- how to?

2015-09-03 Thread Patrik Nordwall
On Fri, Aug 21, 2015 at 5:46 PM, Alexey Shuksto wrote: > Well, I was able to achieve needed behavior with following flow scheme: > > Flow() { implicit builder ⇒ > val promises = builder add Source(() ⇒ Iterator continually Promise[O]()) > > val fan = builder add Broadcast[Promise[O]](2) > v

Re: [akka-user] [akka-streams] ActorSubscriber to ActorPublisher flow -- how to?

2015-09-03 Thread Алексей Шуксто
чт, 3 сент. 2015 г. в 11:38, Patrik Nordwall : > On Fri, Aug 21, 2015 at 5:46 PM, Alexey Shuksto wrote: > >> Well, I was able to achieve needed behavior with following flow scheme: >> >> Flow() { implicit builder ⇒ >> val promises = builder add Source(() ⇒ Iterator continually Promise[O]()) >>