Re: [akka-user] Stopping a reactive stream

2014-10-31 Thread Akka Team
Hi Adam, On Thu, Oct 30, 2014 at 1:43 PM, Adam Warski a...@warski.org wrote: There's an OnCompleteDrain :) (btw. - sink, drain, subscriber - a lot of names ;) ) Drain is no longer there (as a name at least) and you should usually not see a Subscriber ;) How do I use broadcast, thought? I

Re: [akka-user] Stopping a reactive stream

2014-10-31 Thread Adam Warski
On Thu, Oct 30, 2014 at 1:43 PM, Adam Warski ad...@warski.org javascript: wrote: There's an OnCompleteDrain :) (btw. - sink, drain, subscriber - a lot of names ;) ) Drain is no longer there (as a name at least) and you should usually not see a Subscriber ;) It is in 0.9, but as I

Re: [akka-user] Stopping a reactive stream

2014-10-31 Thread Akka Team
On Fri, Oct 31, 2014 at 10:50 AM, Adam Warski a...@warski.org wrote: So even if sink1 fails, the whole setup will continue? So using sink2 (on complete sink/drain) won't have any effect? Is there a way to detect errors in such case then? Sink2 will detect the failure of source, but not of

Re: [akka-user] Stopping a reactive stream

2014-10-31 Thread Adam Warski
So even if sink1 fails, the whole setup will continue? So using sink2 (on complete sink/drain) won't have any effect? Is there a way to detect errors in such case then? Sink2 will detect the failure of source, but not of sink1. Currently there is no way to detect it, because most

Re: [akka-user] Stopping a reactive stream

2014-10-31 Thread Adam Warski
Ok, so getting closer, seems to work :) Thanks a lot for the help. On the sender side I added a separate flow for the input stream, attached an on complete drain and I get the callback. One small thing, even if I kill the other side of the connection, the callback contains a Success(()). On

Re: [akka-user] Stopping a reactive stream

2014-10-30 Thread Akka Team
Hi Adam, This might or might not be associated with the components of the stream itself; in my current scenario I have a sink which is a reactive tcp connection. What do you mean by a reactive tcp connection here? Is it an Akka TCP stream? I don't seem to be getting any errors (at least

Re: [akka-user] Stopping a reactive stream

2014-10-30 Thread Akka Team
Hi Adam, I'm not running Windows (MacOS), but how could these signals be handled? I was looking for some handlers in the value returned by run() (e.g. onComplete, onError), but it seems not much is there :) Which version of Akka Stream are you using and which version of the scaladsl? How

Re: [akka-user] Stopping a reactive stream

2014-10-30 Thread Adam Warski
Sure :) I'm using streams 0.9, scaladsl2 and I want to add failure detection to that: https://github.com/adamw/reactmq/blob/master/src/main/scala/com/reactmq/Sender.scala Adam On Thursday, October 30, 2014 12:04:23 PM UTC+1, Akka Team wrote: Hi Adam, I'm not running Windows (MacOS), but

Re: [akka-user] Stopping a reactive stream

2014-10-30 Thread Akka Team
Hi Adam, You can use broadcast to split out the stream going into the Sink, and then attach to that side of the graph an OnCompleteSink which takes a function callback: Try[Unit] ⇒ Unit which is called during normal and failure termination. -Endre On Thu, Oct 30, 2014 at 12:31 PM, Adam Warski

Re: [akka-user] Stopping a reactive stream

2014-10-30 Thread Adam Warski
There's an OnCompleteDrain :) (btw. - sink, drain, subscriber - a lot of names ;) ) How do I use broadcast, thought? I can see it can be a vertex in the graph, but how to add it? So I'll end up with sth like this: /--- sink1 (output

[akka-user] Stopping a reactive stream

2014-10-29 Thread Adam Warski
Hello, is there a way to stop a reactive running reactive stream, e.g. by making it watch some other actors, and when they are dead, die as well? This might or might not be associated with the components of the stream itself; in my current scenario I have a sink which is a reactive tcp