[zeromq-dev] Some clarifications about HWM for pub/sub

Chuck Remes cremes.devlist at mac.com
Mon Nov 28 17:26:58 CET 2011


On Nov 28, 2011, at 10:19 AM, Emmanuel TAUREL wrote:

> Hello all,
> 
> I am using ZMQ 3.0.x on linux boxes with  the PUB/SUB pattern.
> I have one publisher and two subscribers. I have a HWM set on the publisher to 50 and no HWM on the subscribers.
> When the HWM limit is reached on the publisher, following messages are dropped on the publisher side
> and both subscribers do not receive them.
> 
> "man zmq_setsockopt" tell me this for the ZMQ_SNDHWM option:
> 
> -------------------
> 
> The high water mark is a hard limit
> on the maximum number of outstanding messages 0MQ shall queue in memory
> for any single peer that the specified socket is communicating with.

The part that says "for any single peer" means that each peer has its own SNDHWM enforcement.

> 
> -------------------
> 
> Do I have to understand that all peers are affected when the pub HWM is reached?

No. Only the peer that has reached the limit is affected. Other peers that have not reached the limit should not see any message drops.

cr




More information about the zeromq-dev mailing list