[zeromq-dev] subscriber stops receiving messages after reconnect

Pieter Hintjens ph at imatix.com
Tue Dec 17 16:29:39 CET 2013


On Tue, Dec 17, 2013 at 3:41 PM, Petr Postulka <ppostulka at gmail.com> wrote:

> If we monitor
> the socket state via Socket Monitor API, the subscriber does not
> recognize the disconnection at all.

That is possible, and there is no way to automatically fix this.
Manual workaround: publisher should send a heartbeat ever second
(client should subscribe to those), and if subscriber gets no data and
no heartbeat for >1 second, it closes socket and reconnects. You can
raise or lower frequency of heartbeats depending on needs.

-Pieter



More information about the zeromq-dev mailing list