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

Russell Della Rosa rdellar2000-zeromq at yahoo.com
Mon Mar 23 15:39:37 CET 2015

I'm doing this using JeroMq (may use jzmq at some point) so I'm at the mercy of the JVM.
I have a wrapper around the JVM that heartbeats also, it and will kill the JVM if it doesn't reply with a pong.  After the wrapper kills the JVM, it will quickly restart the JVM so I'm not sure there is a good point to send this shutdown message.  (The wrapper might be able to but I think that might get complex.)
I like this idea though since it keeps the server stateless.
      From: Justin Karneges <justin at affinix.com>
 To: zeromq-dev at lists.zeromq.org 
 Sent: Friday, March 20, 2015 2:41 PM
 Subject: Re: [zeromq-dev] Ping Pong Heartbeats & Quick Server Restart Issue
> 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.
zeromq-dev mailing list
zeromq-dev at lists.zeromq.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20150323/a2dbf0e4/attachment.htm>

More information about the zeromq-dev mailing list