Re: [akka-user] Creating a reconnecting TCP client

2015-09-17 Thread Konrad Malawski
Hi there, I actually implemented something like a “reconnect” a number of times (most of them ending up in overcomplication though…). The style we ended up with is indeed an Actor which encapsulates the connection handling, and gets notified if the stream is completed (i.e. .toMat(Sink.onComplete

Re: [akka-user] Creating a reconnecting TCP client

2015-09-08 Thread Akka Team
Hi Adam, This is not a trivial task to be honest, and I cannot really give you a nice way to use it. The difference from Rx Observables is that RS implements explicit backpressure (i.e. instead of blocking it uses explicit asynchronous signals) and therefore makes all processing stage inherently

Re: [akka-user] Creating a reconnecting TCP client

2015-09-08 Thread אדם חונן
I'm OK with lost data - I assume messages can be lost anyway, even without disconnection, so the API I want to provide will not guarantee message delivery and users will be aware of that, and that they are actually sending asynchronous messages. I was also thinking that a possible alternative

[akka-user] Creating a reconnecting TCP client

2015-09-06 Thread Adam
Hi, I've been looking for a way to create a client that upon disconnection will try to reconnect. I've done this in the past with RxJava observables, but I'm not sure how to do this using Akka Streams. I saw some code examples where PushStage is being used to implement this, but the code