[zeromq-dev] ZMQ_HWM doesn't work?

Pavel Gushcha pavimus at gmail.com
Mon Jan 17 11:54:25 CET 2011


>>
>> At my box this behavour is reproducible with zmq 2.1.0 and current
>> master branch. May be something is wrong with test programs?
>>
>>
>You've got to set the sock opt before you do the bind/connect - it will
>apply to all connections made after it is set.

Thanks for help, Ian! I missed that. after i moved bind, producer
doesn't send messages without limits.

But producer/consumer doesn't follow yet ZMQ_HWM limits. I specified
10 as HWM for producer and consumer. So, after staring consumer
producer must sent totally about 20 messages (10 will be placed in
producer output buffer, 10 in consummer input buffer). Now, after
starting consumer, producer in one second sends about 37000-44000
messages.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: producer.c
Type: text/x-csrc
Size: 763 bytes
Desc: not available
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20110117/b19a5626/attachment.c>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: consumer.c
Type: text/x-csrc
Size: 703 bytes
Desc: not available
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20110117/b19a5626/attachment-0001.c>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: zhelpers.h
Type: text/x-chdr
Size: 4764 bytes
Desc: not available
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20110117/b19a5626/attachment.h>


More information about the zeromq-dev mailing list