--
>>>>>>>>>> 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 akka-user+...@googlegroups.com.
To post to this group, send email to akka...@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to a topic in the Google Groups "Akka User List" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/akka-user/hBSiWAYKEiw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to akka-user+...@googlegroups.com.
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 { case _ => self ! Disconnected })(Keep.left), and then it creates the flow a-new simply). The upside of this is that it can easily handle “wait a bit before reconnecting”, since you can use the Actor’s access to the system scheduler.
You may need to fan-out explicitly into the completion-signal-emitting-part and the data-signalling-part (just use Broadcast :-)).