This was sent to me privately but should have been sent to the mailing list. 

cr

Begin forwarded message:

> From: Emmanuel TAUREL <[email protected]>
> Date: November 29, 2011 6:20:50 AM CST
> To: Chuck Remes <[email protected]>
> Subject: Re: [zeromq-dev] Some clarifications about HWM for pub/sub
> Reply-To: [email protected]
> 
> On 28/11/2011 18:23, Chuck Remes wrote:
>> 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
>> 
> 
> The code is now at https://gist.github.com/b7e0168b0c40bef57378
> There is one file for the publisher and another one for the subscriber (C++). 
> The third file contains only comments.
> Both subscribers do not receive messages when the publisher high water mark 
> is reached. This is something I understand because if the
> messages are dropped (due to HWM) and not inserted into the pub queue, how 
> could they be transmitted to any subscribers?
> 
> But this is only a guess and I would like to have confirmation from experts.
> If this is confirmed, I think the man page sentence (man zmq_setsockopt) 
> reported in the mail at the origin of this thread is not really clear.
> But English is not my mother tongue and the problem is may be simply due to 
> my English understanding
> 
> Regards
> 
> Emmanuel
> 

_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to