activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Lison (JIRA) <>
Subject [jira] Created: (AMQ-2685) FlowControl does not work when no consumer is attached
Date Mon, 05 Apr 2010 10:09:08 GMT
FlowControl does not work when no consumer is attached

                 Key: AMQ-2685
             Project: ActiveMQ
          Issue Type: Bug
          Components: Broker
    Affects Versions: 5.3.1
         Environment: Linux SMP x86_64 GNU/Linux
            Reporter: André Lison

When a producer fills a queue with flow control enabled and there is no consumer, flow control
does not work as expected, therefore it does not slow down or block the producer. If the queue
is over the configured limit and then a consumer is attached, the flow control kicks in immediately
and denies producers to push new messages onto the queue until the CursorPercentUsage is down
to 100%.

More detailed:
When there is only one producer and no consumer, the jconsole shows CursorMemoryUsage=0 and
CursorPercentUsage=0 and the broker fills up the storage until it is full according to the
systemUsage settings. CursorMemoryUsage can increase slightly but does not reflect the overall
memory usage of the queue (mem+storage). The producer is only stopped (by the flow control?)
when the queue hits the storeUsage-limit.
As soon as there is a consumer attached, the CursorMemoryUsage shows much higher values and
the CursorPercentUsage is of course way over 100%. The producer is blocked until the CursorPercentUsage
down to 100% and CursorPercentUsage is almost equal to the policyEntry/memoryLimit of the
queue - which looks like the desired behavior to me. Now flow control works and keeps producer
and consumer in balance.

My activemq.xml:
                <policyEntry topic=">" producerFlowControl="false" memoryLimit="5mb">
                    <vmCursor />
                <policyEntry queue="result.>" producerFlowControl="true" memoryLimit="60
                    <memoryUsage limit="100 mb"/>
                    <storeUsage limit="1 gb" name="foo"/>
                    <tempUsage limit="100 mb"/>

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message