activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mats Henrikson <>
Subject Re: How to configure 5.3 broker over KahaDB to support lots of unconsumed persistent msgs?
Date Wed, 17 Feb 2010 03:51:30 GMT
Hi Gary,

I checked out your test case and seeing that that worked fine set out
to figure out why my test case didn't.

As it turns out it is because of my <tempUsage>:

                    <memoryUsage limit="100 mb"/>
                    <storeUsage limit="20 gb" name="store"/>
                    <tempUsage limit="100 mb"/>

When I comment out the <tempUsage> everything works fine.

Your test case has the same behaviour, if you also set:

        brokerService.getSystemUsage().getTempUsage().setLimit(10 *
1024 * 1024);

When set the broker will just freeze after some number of messages,
and using JMX/JConsole the queue now doesn't render its attributes,
you can't connect a consumer etc.

Is that expected behaviour?

I also found that using my current configuration I don't seem to have
to tweak my cursorMemoryHighWaterMark at all, everything seems to work
fine without it for my settings (queue memoryLimit=10mb,
producerFlowControl=true, memoryUsage limit=100mb, storeUsage


Mats Henrikson

On 17 February 2010 02:15, Gary Tully <> wrote:
> Ok. there is a problem and a workaround. see:
> The test case[1] attached to the jira works as expected with the workaround.
> The tests is based on the code posted by Scot.
> As the file cursor and the queue share the same usage, (they are split for
> vmcursors), the key to ensuring the cursor limit kicks in before the queue
> memory limit (and producer flow controll) is to configure a cursor,
> policy.setCursorMemoryHighWaterMark(50); which is less than the 70% value
> used by the Queue. This ensures that it will spool messages to disk once 50%
> of the system usage is reached.
> Have a peek at the test case, [1]

View raw message