You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Dejan Bosanac (JIRA)" <ji...@apache.org> on 2010/12/02 14:09:54 UTC

[jira] Updated: (AMQ-2685) FlowControl does not work when no consumer is attached

     [ https://issues.apache.org/jira/browse/AMQ-2685?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dejan Bosanac updated AMQ-2685:
-------------------------------

    Fix Version/s:     (was: 5.4.2)
                   5.5.0

> FlowControl does not work when no consumer is attached
> ------------------------------------------------------
>
>                 Key: AMQ-2685
>                 URL: https://issues.apache.org/jira/browse/AMQ-2685
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.3.1
>         Environment: Linux 2.6.25.20-0.5-default SMP x86_64 GNU/Linux
> java version "1.6.0_17"
> Java(TM) SE Runtime Environment (build 1.6.0_17-b04)
> Java HotSpot(TM) 64-Bit Server VM (build 14.3-b01, mixed mode)
>            Reporter: André Lison
>             Fix For: 5.5.0
>
>
> 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:
>         ...
>         <destinationPolicy>
>             <policyMap>
>               <policyEntries>
>                 <policyEntry topic=">" producerFlowControl="false" memoryLimit="5mb">
>                   <pendingSubscriberPolicy>
>                     <vmCursor />
>                   </pendingSubscriberPolicy>
>                 </policyEntry>
>                 <policyEntry queue="result.>" producerFlowControl="true" memoryLimit="60 mb">
>                 </policyEntry>
>               </policyEntries>
>             </policyMap>
>         </destinationPolicy> 
>         .....
>         <systemUsage>
>             <systemUsage>
>                 <memoryUsage>
>                     <memoryUsage limit="100 mb"/>
>                 </memoryUsage>
>                 <storeUsage>
>                     <storeUsage limit="1 gb" name="foo"/>
>                 </storeUsage>
>                 <tempUsage>
>                     <tempUsage limit="100 mb"/>
>                 </tempUsage>
>             </systemUsage>
>         </systemUsage>
>         ...

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