[zeromq-dev] Majordomo worker API destroy worker socket
Martijn Rijkeboer
zeromq at bunix.org
Mon Feb 18 12:12:14 CET 2013
Pieter,
> Good point. The DEALER socket will reconnect, yes. In the text of the
> Guide, where we discuss mdwrkapi, it says:
>
> "You might wonder why the worker API is manually closing its socket
> and opening a new one, when 0MQ will automatically reconnect a socket
> if the peer disappears and comes back. Look back at the Simple Pirate
> and Paranoid Pirate workers to understand. Although 0MQ will
> automatically reconnect workers if the broker dies and comes back up,
> this isn't sufficient to re-register the workers with the broker. I
> know of at least two solutions. The simplest, which we use here, is
> for the worker to monitor the connection using heartbeats, and if it
> decides the broker is dead, to close its socket and start afresh with
> a new socket. The alternative is for the broker to challenge unknown
> workers when it gets a heartbeat from the worker and ask them to
> re-register. That would require protocol support."
Sorry missed that part. Next time I'll try to read better.
Kind regards,
Martijn Rijkeboer
More information about the zeromq-dev
mailing list