[zeromq-dev] ZMQ_HWM not working
ph at imatix.com
Tue Mar 1 12:47:17 CET 2011
The HWM is not a reliable mechanism to deliver messages one by one.
All it does is limit the buffer at consumer and/or sender. Your
assumption that HWM means "give me one message at a time" is
incorrect, and 0MQ has never worked like that. HWM means "store at
most one message on my incoming/outgoing buffer". But messages can
also be queued in network buffers.
Since you're sending quite large messages (10K), it's possible that
this *just* worked in 2.0.10 and that in 2.1.1 the default network
buffer size has changed. However, to repeat, HWM is not a precise
mechanism, and you should not use it for message-based flow control.
If you really want to deliver messages one at a time, you need to talk
back from your consumers to your producers via some sockets.
On Tue, Mar 1, 2011 at 5:09 AM, Jogeshwar Karthik Akundi
<ajkarthik at gmail.com> wrote:
> ZMQ Version: 2.1.1 rc (latest downloaded 1 day ago from the site)
> OS: windows
> I am using Inproc PUSH-PULL mechanism. I was trying out a "one producer -
> multiple consumers (load balanced, not cloning)" scenario.
> The same code (with a few changes regarding socket migration) works fine on
> 2.0 but not on 2.1.1.
> When all the consumers are operating with a HWM = 1, the producer would
> queue up on message to each of the consumers and get blocked till at least
> one consumer is ready to accept another message.
> 2.0: This is correctly seen.
> 2.1: The HWM is ignored and the producer is able to queue up frames
> continuously to all the consumers even though they are not ready to take up
> the next message.
> Please find the Producer/Consumer files attached for your reference.
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
More information about the zeromq-dev