[zeromq-dev] queue limits

Pavel Gushcha pavimus at gmail.com
Tue Sep 29 16:02:58 CEST 2009

2009/9/29 Martin Sustrik <sustrik at fastmq.com>

> Hi Pavel,
>  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")
> The change you've proposed is one possibility. The other would be to set
> the values to dispatcher object so that you don't have to supply the limits
> in every call:

> dispatcher_t dispatcher (2);
> dispatcher.set_watermarks (1000, 500);
> Martin
Adding limits for every call gives possibility to specify distinct
watermarks for every backend engine. Adding set_watermarks() allows this
possibility too, if before calling create_exchange/create_queue/bin we call
set_watermarks(). But we can get wrong watermarks if different threads are
calling create_queue/create_exchange/bind simultaneously.

I think, additial parameters for create_queue/create_exchange/bind and
set_watermarks() will be a good solution. set_watermarks gives simplicity,
additional parameters - additional possibility :-)

PS: In my application only one queue receives big messages, others- small
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20090929/d39e8ff4/attachment.htm>

More information about the zeromq-dev mailing list