git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Possible issue with Queue.start()


Hi,

I have been looking in an application using ActiveMQ and have a situation
where a producer is blocked with this log message due to the temp usage
limit being hit:

[ActiveMQ Transport: tcp:///aaa.bbb.ccc.ddd:65119@64759] 82567721 INFO
org.apache.activemq.broker.region.Queue -
Usage(Main:temp:queue://aaabbb:temp) percentUsage=99%, usage=61771109932,
limit=61771104256, percentUsageMinDelta=1%;Parent:Usage(Main:temp)
percentUsage=100%, usage=61771109932, limit=61771104256,
percentUsageMinDelta=1%: Temp Store is Full (99% of 61771104256). Stopping
producer (ID:aaaaa-3:1:1:1) to prevent flooding queue://aaabbb. See
http://activemq.apache.org/producer-flow-control.html for more info
(blocking for: 8512s)

In the past I have been able to use JConsole and update the broker's JMX
TempLimit value to a higher value to allow things to continue.

However on this occasion, the messages above when output again show that
the parent's limit has updated however the child's limit is unchanged.  So
it seems the broker's TempUsage does not know about the queue's TempUsage.
In looking at the code.. it seems a child Usage class has to call start()
in order for this parent -> children link to be established (and for limit
changes to be propagated down), but the Queue start() method doesn't call
systemUsage.getTempUsage().start() for some reason (or even just
systemUsage.start()).

Is this a bug?

DestinationView sadly does not expose setTempLimit() either so I am really
stuck.

>From Queue:

    @Override
    public void start() throws Exception {
        if (started.compareAndSet(false, true)) {
            if (memoryUsage != null) {
                memoryUsage.start();
            }
            if (systemUsage.getStoreUsage() != null) {
                systemUsage.getStoreUsage().start();
            }
            systemUsage.getMemoryUsage().addUsageListener(this);
            messages.start();
            if (getExpireMessagesPeriod() > 0) {
                scheduler.executePeriodically(expireMessagesTask,
getExpireMessagesPeriod());
            }
            doPageIn(false);
        }
    }