[zeromq-dev] queue limits

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


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

> Pavel,
>
>  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
>> messages.
>>
>
> Both versions are viable, however keep in mind that changing the signature
> of create_exchange/create_queue/bind APIs requires changing all the language
> bindings to reflect the change. If not done the code cannot be merged into
> the trunk. Adding a new function won't require that kind of thing.


> Martin
>

I forgot about bindings :-) You are right, adding set_watermarks() will be
simpler. I'll syncromize calls to create_queue/create_exchange/bind by
global mutex. There is no performance penalty, because in common usecase all
objects/bindings are created only at application start.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20090929/cfb962bc/attachment.htm>


More information about the zeromq-dev mailing list