[zeromq-dev] queue limits
Pavel Gushcha
pavimus at gmail.com
Tue Sep 29 11:07:02 CEST 2009
Thanks for useful info.
I want to implement different backend protocol engine limits for different
objects. How you think, it will be good to have this functionality in master
branch?
As i understand, there is three places, where backend protocol engines will
be created:
1) create_exchange (if exchange is global)
2) create_queue (if queue is global)
3) bind (if we are binding something to global exchange/queue)
This is correct?
(I plan add to these api calls two paramaters "int64_t bp_hwm,int64_t
bp_lwm")
2009/9/23 Martin Sustrik <sustrik at fastmq.com>
> Pavel,
>
> I changed lwm to 5, hwm to 10, and things doesn't change (20000 sent
>> messages before block, 100mb of ram for display.cpp and propmt.cpp). Is
>> there any method to decrease amount of sent messages before blocking (in my
>> case each message may have size of 1megabyte)?
>>
>
> Have a look at libzmq/zmq/config.hpp:
>
> // High and low watermark for backend protocol engines.
> bp_hwm = 10000,
> bp_lwm = 5000,
>
> Actual watermarks are composed of user-defined watermarks + protocol engine
> watermarks. Protocol engine is configured to hold at most 10000 messages -
> the value makes sense for market-data feeds of tiny stock quote messages,
> but may be overkill in your case.
>
> Thus, on the exchange side of the connection actual watermarks are
> 0+bp_hwm, 0+bp_lwm (exchange itself has no message queue).
>
> On the queue side of the connection actual watermarks are queue_hwm+bp_hwm,
> queue_lwm+bp_lwm.
>
> If you want to severely limit number of messages in the flight you may want
> to limit bp_hwm/bp_lwm.
>
> Martin
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20090929/bfcc9b04/attachment.htm>
More information about the zeromq-dev
mailing list