[zeromq-dev] Example of a proper disconnect sequence
Pedro Melo
melo at simplicidade.org
Thu Aug 16 13:32:59 CEST 2012
Hi,
I have multiple clients PUSHing messages to a pair of PULL workers.
Clients connect, workers bind. I'm trying to figure out how to
properly gracefully restart a worker without loosing messages.
Reading the docs I know I should do a unbind() on the worker PULL
socket, but I'm not sure how my application will get notified that all
in-transit or already queued messages are delivered?
Are PUSH sockets somehow notified that their peer is no longer available?
Or must I use another socket (maybe a PUB/SUB) so that workers signal
clients "hey, I'm going away" and ask them the disconnect()?
Is there a way for workers to check after unbind if there are still
connected clients? This would help workers determine when its safe to
exit after a zmq_pool reveals no more messages pending.
Finally, I know the Guide is not up-to-date to 3.2, is there a wiki or
something with up-to-date 3.2 zeromq patterns?
Thanks,
--
Pedro Melo
@pedromelo
http://www.simplicidade.org/
http://about.me/melo
xmpp:melo at simplicidade.org
mailto:melo at simplicidade.org
More information about the zeromq-dev
mailing list