[openamq-dev] queue_bind, size and consume/cancel

Martin Sustrik sustrik at imatix.com
Fri Nov 9 22:46:27 CET 2007


Dmitri,

> Looks like when I set "trim" size limit, the "kill" limit is still there
> and it is set to 50K or so. So when I set trim limit to 70K, without
> specifying "kill" size - my queue gets killed when it reaches the size
> of 50K. If I set "warn", "trim" and "kill" (although kill is kinda
> redundant here :) ) - everything works - queue gets trimmed at my "trim"
> limit! 

Actually, this is not a bug. It is a feature! And a counter-intuitive 
one indeed :)

Let me explain.

Each queue profile can define several actions. That way you can can warn 
when the number of messages in queue exceeds 10000 and kill the queue 
when it goes over 50000.

So far so good.

Now, the profile you've wrote (amq_server.cfg) inherits the defaults 
from amq_server_base.cfg.

amq_server_base.cfg defines the limits in the following way:

         <limit name = "warn" value = "10000" />
         <limit name = "kill" value = "50000" />

amq_server.cfg defines them as follows:

         <limit name = "trim" value = "70000" />

After inheritance is done, the list of actions looks like this:

         <limit name = "warn" value = "10000" />
         <limit name = "kill" value = "50000" />
         <limit name = "trim" value = "70000" />

So the broker warns at 10000 messages in queue, kills it at 50000 and 
starts trimming it at 70000 (purely hypothetical case of course given 
that the queue is killed at 50000).

As I said, it's highly counter-intuitive, but it is a feature.

Maybe we should redesign is somehow to make it more user-friendly.

Martin


More information about the openamq-dev mailing list