[zeromq-dev] Cannot setup high water mark for PUB/SUB

Aaron Sokoloski asokoloski at gmail.com
Thu Jul 14 11:22:03 CEST 2016

Hi Vince,

Sorry to not directly answer your question, but what's the actual problem
you're trying to solve?

For example, what is limiting the subscriber from reading incoming messages
as fast as they arrive, in your use case?

On 13 July 2016 at 18:09, vincegata <vincegata at gmail.com> wrote:

> Hello All,
> I cannot seem to be able to set up the high water mark for PUB/SUB.
> My subscriber is expected sometimes to be somewhat slower than publisher
> hence I want the publisher to drop the messages when subscriber is slow. I
> want
> to set up the high water mark to, say, 2 messages, so when the subscriber
> is behind
> for two messages then the publisher will start dropping them.
> Can you take a look at my code. The publisher sends messages once every
> 200ms,
> the subscriber reads messages once every second, the high water mark is
> set to 2.
> Hence, I expect subscriber to receive approximately every fifth message.
> However,
> my subscriber diligently reads all messages consequently and the publisher
> gets far
> ahead.
> http://pastebin.com/2fv525ke
> -- thank you!
> _______________________________________________
> 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/20160714/ae1ef433/attachment.htm>

More information about the zeromq-dev mailing list