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

Dmitri Tsyganov dmitri.tsyganov at dowjones.com
Sat Nov 10 00:13:52 CET 2007


Thanks, I forgot about amq_server_base.cfg!

I think that would be nice if it can check if "kill" < "trim" and set
"kill" to trim + 1 (or something, maybe +10%). 

Dmitri

On Fri, 2007-11-09 at 22:46 +0100, Martin Sustrik wrote:
> 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
> _______________________________________________
> openamq-dev mailing list
> openamq-dev at lists.openamq.org
> http://lists.openamq.org/mailman/listinfo/openamq-dev


More information about the openamq-dev mailing list