Gary,

I have a related question after reading the blog post and the wiki about the
various store settings. My application keeps running in to these store
issues, as we're sending almost 100% NON-persistent messages, yet we have
some messages which will never be consumed. I do not control all of the
producers and thus some producers send messages with no expiration value. 

So I have queue A which effectively over time "fills" up with messages and
only 1/3 of them are consumed because they're the ones we care about,
however we want to just dump the other 2/3 of them without consuming them or
having to even know they're there. Most importantly I do NOT want to throw
an exception to the consumers or producers as the most current messages that
pass the consumers JMS message filter statement are more important than any
of the older messages sitting around. (kind of the opposite of the blog post
scenario).

So how can I ensure that we'll dumping the old to keep the "new" valid? I'd
like it to almost be a situation where the newest messages just push the old
ones out to make room instead of the broker grinding to a halt as it does
today waiting the old ones to get consumed. Since I don't have control over
the producer, is there's a way to set this by policy on the queue?

We've experienced very similar slow down to stops like Richard has, albeit
under slightly different circumstances.

Best Regards

Colin



Gary Tully wrote:
> 
> Hi Richard,
> There is a caveat with disk usage and the default store. Space in the
> store is reclaimed by deleting unreferenced data files during cleanup.
> However, if the store consists of a single data file, it will not be
> reclaimed as the single data file will always be referenced.
> Thus it is necessary to configure a maximumFileLength for the store
> that is less than half of the system usage store limit. In this way,
> at least 2 data files will be used by the store and when sufficient
> messages have been consumes such that one of the data files is no
> longer referenced, the store usage will decrease when it is reclaimed
> after cleanup.
> There is a good description of using the usage manager in this way
> along with some configuration that works at
> http://open-source-adventures.blogspot.com/2009/01/limiting-disk-store-usage-with-active.html
> (see this caveat mentioned at the end).
> 
> hope this helps,
> Gary.
> 
> 2009/2/23 Scouser <m...@gmav.demon.co.uk>:
>>
>> Hiya
>>
>> Thanks for that - clarified the issue nicely, but I have now found
>> something
>> odd which may be related.
>>
>> If I use flow control with fairly small values for memoryLimit e.g.
>>
>> <policyEntry queue="xyz.Queue" useCache="true" producerFlowControl="true"
>> memoryLimit="3mb">
>>
>> Then if I generate a lot of messages I eventually get an exception as I
>> would expect:
>>
>> javax.jms.ResourceAllocationException: SystemUsage memory limit reached
>>
>> At this point, producers can only write to the queue as space is freed up
>> by
>> by consumers so this works as I would expect.  However, if I use a larger
>> memoryLimit value and get an exception when I run out of storage:
>>
>> javax.jms.ResourceAllocationException: Usage Manager Store is Full
>>
>> then the producers seem to hang even if the pending messages are
>> consumed.
>> That is, they always generate a 'Usage Manager Store is Full' exception
>> even
>> if all the message have been consumed.  I have also noticed that the
>> 'Store
>> percent used' value in the Admin application never drops once it has got
>> to
>> 100%
>>
>> Any thoughts?
>>
>> Cheers
>>
>> Richard
>>
>>
>>
>>
>>
>> Dejan Bosanac wrote:
>>>
>>> Hi,
>>>
>>> you have set "store usage" in your activemq.xml and set it to fail if
>>> there
>>> is no more space. I just put up a section describing this behavior
>>>
>>> http://cwiki.apache.org/confluence/display/ACTIVEMQ/Producer+Flow+Control#ProducerFlowControl-Systemusage
>>>
>>> Cheers
>>> --
>>> Dejan Bosanac
>>>
>>> Open Source Integration - http://fusesource.com/
>>> ActiveMQ in Action - http://www.manning.com/snyder/
>>> Blog - http://www.nighttale.net
>>>
>>>
>>> On Sun, Feb 22, 2009 at 3:52 PM, Scouser <m...@gmav.demon.co.uk> wrote:
>>>
>>>>
>>>> I'm fairly new to activeMQ and have become stuck on an error.  I don't
>>>> seem
>>>> to be able to find much out about the root cause.  I have a small
>>>> example
>>>> which send messages to a couple of queues and reads the messages out.
>>>> I'm
>>>> using Spring's JMS template etc to do most of the hard work.
>>>>  Eventually
>>>> I
>>>> get the following crash:
>>>> ...
>>>> SEVERE: Usage Manager Store is Full; nested exception is
>>>> javax.jms.ResourceAllocationException: Usage Manager Store is Full
>>>> org.springframework.jms.ResourceAllocationException: Usage Manager
>>>> Store
>>>> is
>>>> Full; nested exception is javax.jms.ResourceAllocationException: Usage
>>>> Manager Store is Full
>>>>        at
>>>>
>>>> org.springframework.jms.support.JmsUtils.convertJmsAccessException(JmsUtils.java:298)
>>>>        at
>>>>
>>>> org.springframework.jms.support.JmsAccessor.convertJmsAccessException(JmsAccessor.java:168)
>>>>        at
>>>> org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:474)
>>>>
>>>> ...
>>>> Caused by: javax.jms.ResourceAllocationException: Usage Manager Store
>>>> is
>>>> Full
>>>>        at
>>>> org.apache.activemq.broker.region.Queue.doMessageSend(Queue.java:430)
>>>>        at org.apache.activemq.broker.region.Queue.send(Queue.java:417)
>>>>        at
>>>>
>>>> org.apache.activemq.broker.region.AbstractRegion.send(AbstractRegion.java:354)
>>>> ...
>>>>
>>>> So, what is the 'Usage Manager' ?, any ideas what I may have done
>>>> wrong?,
>>>> any and all help appreciated!
>>>>
>>>>
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/Usage-Manager-Store-is-Full---Root-Cause--tp22147570p22147570.html
>>>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>>>
>>>>
>>>
>>>
>>> -----
>>> Dejan Bosanac
>>>
>>> Open Source Integration - http://fusesource.com/
>>> ActiveMQ in Action - http://www.manning.com/snyder/
>>> Blog - http://www.nighttale.net
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Usage-Manager-Store-is-Full---Root-Cause--tp22147570p22172029.html
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> -- 
> http://blog.garytully.com
> 
> Open Source SOA
> http://FUSESource.com
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Usage-Manager-Store-is-Full---Root-Cause--tp22147570p22192964.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to