[zeromq-dev] ZMQ 2-x PUBSUB when router dies

Alex Sergeyev abc at alexsergeyev.com
Fri Jun 1 23:59:38 CEST 2012

Yeah, I'll probably go this way. The thing is that publisher did not
die, it's the router in-between them that gone away suddenly (crashed
in a way similar to unplugging it or separating network physically
without letting the endpoints know about it).

IMO tcp keepalive that you have in 3.1 could be helpful to deal with
situation like this in future.



On Fri, Jun 1, 2012 at 5:20 PM, Pieter Hintjens <ph at imatix.com> wrote:
> On Fri, Jun 1, 2012 at 9:37 PM, Alex Sergeyev <abc at alexsergeyev.com> wrote:
>> One router core-dumped today. Subscriber behind it never realized that
>> it's time to reconnect and kept waiting for messages until I realized
>> that data is not there... Do you know what is the scenario of events
>> for such situation? How long would've that continued until anything
>> (OS or ZMQ) would've closed that socket?
>> Should I have application - level fix for such situation or there is
>> some ZMQ socket option that I could've used?
> Normally if the publisher restarts, the subscriber socket will
> reconnect automatically. There is no 0MQ option for the subscriber to
> give up. You can add this quite easily... send a heartbeat if there is
> no other data going out, then if there's no heartbeat after a timeout,
> the subscriber knows the publisher is dead or frozen.
> -Pieter
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev

More information about the zeromq-dev mailing list