[zeromq-dev] Some clarifications about HWM for pub/sub
Chuck Remes
cremes.devlist at mac.com
Mon Nov 28 18:23:54 CET 2011
On Nov 28, 2011, at 10:55 AM, Emmanuel TAUREL wrote:
> Hi Chuck,
>
> On 28/11/2011 17:26, Chuck Remes wrote:
>> 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.
>
> But this is not what I see on wireshark and on my terminal windows!
> When the HWM is reached, messages are dropped for all peers (at least
> for the 2 I have in my tests).
> I don't see them on the wire on both connections (connection1 with port1
> for sub1 and connection2 with port2 for sub2) and my two
> applications using the subscribers complain.
>
> Therefore, I am a bit confused and I don't really know what should be
> the wanted behavior.
You are going to have to share your code with us. Put it up at pastie.org or gist.github.com along with directions on how to run it.
cr
More information about the zeromq-dev
mailing list