[zeromq-dev] Discard old messages on XPUB before transmission

CFK cfkaran2 at gmail.com
Thu Jul 18 16:45:02 CEST 2013

Hi all, I'm trying to figure out what socket options I need to set under
ZMQ 3.2.3 to force ZMQ XPUB sockets to drop messages if they are old.  I
have time-sensitive messages, any/all of which can be dropped if they are
older than some amount (set by the option) before ZMQ starts actual
transmission. Is there an option for this?  From my testing, ZMQ_SNDTIMEO
does not seem to do this, and none of the other options I've read about
seem to be applicable. As it stands, I'm using pyzmq's MessageTracker
interface, along with a hackish thread interface, to queue all messages I
plan on sending until the currently sent message is actually transmitted,
before starting on the next message.  This is suboptimal, and I'd like to
do something better.

Note that any solution MUST work with XPUB/XSUB as they operate over UDP
(via PGM).  I'm operating on a lossy wireless network, and cannot tolerate
how long TCP takes to timeout a connection, or how long it takes to figure
out a connection is back up.

Cem Karan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20130718/aa52bce3/attachment.htm>

More information about the zeromq-dev mailing list