[zeromq-dev] Ping Pong Heartbeats & Quick Server Restart Issue

Justin Karneges justin at affinix.com
Fri Mar 20 20:41:09 CET 2015

> I'm curious if anyone has solved this quick server restart problem in a
> clean way with socket patterns?  Or if you have other suggestions?  Or if
> you have example code of ping/pong handling this case I'd love to see it.

I suggest having the server send some kind of shutdown message. This is
basically the same as how regular TCP connection loss is indicated,
except that you have to do it yourself rather than the OS doing it for

Of course, the advantage of the OS doing it for you is that you can
ensure a close packet is sent even if your process crashes. This may bit
a bit harder to do with ZeroMQ, depending on the language.

More information about the zeromq-dev mailing list