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

Pieter Hintjens ph at imatix.com
Fri Jun 1 23:20:47 CEST 2012

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.


More information about the zeromq-dev mailing list