activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mitch Granger <mitch.gran...@sophos.com>
Subject Re: How to limit queue by number of messages
Date Fri, 23 Oct 2009 16:02:08 GMT


Dave Stanley wrote:
> I think an EvictionStrategy might work. You can evict least recent or
> most recent messages once your queue gets to a certain size.
> 
> http://activemq.apache.org/maven/activemq-core/apidocs/org/apache/activemq/broker/region/policy/MessageEvictionStrategy.html

MessageEvictionStrategy is mentioned in the slow consumer section of the 
website (http://activemq.apache.org/slow-consumer-handling.html in the 
same section as Pending Message Limit Strategy.  I tried the latter and 
it seems to apply to pending messages on a topic for a particular 
consumer rather than pending messages on a queue for any consumer.

I'll give it a try anyways and report back.  It does sound promising, 
thanks for the tip!

> 
> Cheer's,
> /Dave
> 
> On Fri, Oct 23, 2009 at 6:43 AM, Gary Tully <gary.tully@gmail.com> wrote:
>> Using memory limits or store usage limits with an expiry time are your
>> options for queues at the moment. I think this requirement has been
>> mentioned before, especially for non persistent messages. An internal
>> consumer triggered off the queue size counter could do the necessary. What
>> sort of options would you require w.r.t dealing with discarded messages?
>> What happens in MQ when the maxdepth is reached?
>>
>> Could you raise an enhancement request for this feature?
>>
>> 2009/10/22 Mitch Granger <mitch.granger@sophos.com>
>>
>>> To be clearer, I'm looking for something like Websphere MQ's maxdepth
>>> property for queues.
>>>
>>>
>>> themitchy wrote:
>>>
>>>> I'm looking for a way to keep queue sizes down to a specific number.  For
>>>> example if a queue gets to 100000 messages I would like older message to
>>>> start disappearing.
>>>>
>>>> I'm aware there are some "Pending Message Limit Strategy" options but
>>>> these
>>>> only apply to pending messages on a topic per consumer.  I'm looking for
>>>> something that will limit queue size specifically.
>>>>
>>
>> --
>> http://blog.garytully.com
>>
>> Open Source Integration
>> http://fusesource.com
>>

Mime
View raw message