[zeromq-dev] dealing with time sensitive messages in pub/sub (pub "connects")
robertwalters83 at gmail.com
Sat Nov 12 16:43:49 CET 2011
Right now the behavior of zeromq sockets is that if the sender/publisher
"connects" and the receiver/subscriber "binds" and the receiver temporarily
dies, the sender keeps the message in its queue and keeps retrying the
How do I deal with the case if my message is more time sensitive? I rather
the message be dropped if the receiver isn't there.
I know I can set the HWM on the sender to 1, but that still keeps 1 old
message that will be sent when the receiver eventually comes online.
I thought about attaching time-stamps to the message, but that can get a
little messy when I have to ensure clocks are synchronized precisely, etc.
Basically, I want the queue to be dropped when it has to reconnect (or I
don't want the socket to keep trying reconnections / I want to be notified
when the connection isn't there). What should I do for this case?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the zeromq-dev