[openamq-dev] Help required on OpenAMQ Queue Size
Martin Sustrik
sustrik at imatix.com
Tue Sep 25 09:27:28 CEST 2007
>> And we want to have feature like , we want to restrict the maximum size of
>> the destination. Say for example we want to tell the openamq this queue
>> shouldn't grow more than 50 and this one not more than 100 likewise. I know
>> your configuration provides to do this with shared queues, but that had a
>> huge limitation like it will limit all the shared queues not the specific
>> queues.
>
> This would have to be a change request to the broker. It's certainly
> doable using per-queue configuration. Are you using explicitly named
> queues?
Actually, this functionality is already implemented in the latest
release, although it is not described in the documentation.
In the 'arguments' parameter to amq_client_session_queue_declare
function you can explicitly specify the name of queue profile. You do so
by adding a field named 'profile' with the value equal to requested
profile name to the 'arguments' field table.
(When the profile is not specified, it defaults to 'private' for
exclusive queues and to 'shared' for non-exclusive queues.)
Of course, you have to define the requested queue profile in the server
configuration file, otherwise you'll get error when creating the queue.
Martin
More information about the openamq-dev
mailing list