[zeromq-dev] PUB doesn't discard msg when no SUB

Li, Jia jia.li at credit-suisse.com
Thu May 26 21:49:37 CEST 2011

Thanks! Tried this one, but the one message that remained is the very
first (ancient) message, and each PUB would have such a message. This
would only work if the SUB knows the number of PUBs and thus discards
the first N messages it receives. 

OR: with HWM in effect, do FIFO to kick out the oldest message in the
waiting buffer. 


-----Original Message-----
From: Martin Sustrik [mailto:sustrik at 250bpm.com] 
Sent: Thursday, May 26, 2011 3:40 PM
To: ZeroMQ development list
Cc: Li, Jia
Subject: Re: [zeromq-dev] PUB doesn't discard msg when no SUB

On 05/26/2011 09:27 PM, Li, Jia wrote:

> Putting timestamp can be a work-around, but not efficient, as the SUB 
> has to compare current time against message time for every message.
> It'd be nice to have this behavior either explained in the Guide or 
> brought consistent with the intended usage.

Try setting HWM to 1 on the PUB side. That should drop any outstanding
messages except for one.


Please access the attached hyperlink for an important electronic communications disclaimer: 

More information about the zeromq-dev mailing list