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

Pieter Hintjens pieterh at gmail.com
Thu Jul 18 19:44:49 CEST 2013

There is no option to drop old messages.

On Jul 18, 2013 4:45 PM, "CFK" <cfkaran2 at gmail.com> wrote:

> 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.
> Thanks,
> Cem Karan
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20130718/8520daea/attachment.htm>

More information about the zeromq-dev mailing list