Well, i may have spoken too soon. Tests with a queue's destination policy 
configured like this:

                    <policyEntry queue=">" producerFlowControl="true" 
memoryLimit="64mb">
                        <pendingQueuePolicy>
                            <fileQueueCursor/>
                        </pendingQueuePolicy>
                    </policyEntry>

indicate that the pendingQueuePolicy is ignored if producerFlowControl is 
enabled. The same test (sending 10,000 messages to a queue that has no 
consumers) locks up at the same message count, regardless of whether there's a 
pendingQueuePolicy or not, with this error in the log:
2010-10-01 09:39:51,081 | INFO  | Kaha Store using data directory 
/opt/activemq/data/localhost/tmp_storage | 
org.apache.activemq.kaha.impl.KahaStore | 
default:memory:queue://inbound.tt2etl.q:memory Usage Thread Pool
2010-10-01 09:41:04,855 | INFO  | Usage Manager memory limit reached on 
queue://inbound.tt2etl.q. Producers will be throttled to the rate at which 
messages are removed from this destination to prevent flooding it. See 
http://activemq.apache.org/producer-flow-control.html for more info | 
org.apache.activemq.broker.region.Queue | ActiveMQ Transport: 
tcp:///192.168.22.78:52741

Setting producerFlowControl="false" changes the behavior - messages continue to 
be accepted by the queue, until a consumer starts or AMQ actually runs out of 
heap and the producer's connection is broken.

Joe Niski
IS Development |  NWEA

PHONE 503.212.3382  |  FAX 503.639.7873

NWEA.ORG<3D%22http://www.nwea.org/%22>  |  Partnering to Help All Kids Learn

On 09/29/2010 09:08 AM, Joe Niski wrote:

Thanks for the clarification, Dejan.

*Joe Niski
*IS Development |  NWEA

PHONE 503.212.3382  | FAX 503.639.7873

NWEA.ORG <3D%22http://www.nwea.org/%22> ** | Partnering to Help All Kids
Learn


On 09/29/2010 01:29 AM, Dejan Bosanac wrote:
> No, producer flow control is on by default with store based cursor and
> it will block producers when queue limits are hit. You can
> additionally configure it so that send() method of the producer will
> throw an exception in that case.
>
> Cheers
> --
> Dejan Bosanac - http://twitter.com/dejanb
>
> Open Source Integration - http://fusesource.com/
> ActiveMQ in Action - http://www.manning.com/snyder/
> Blog - http://www.nighttale.net
>
>
>
> On Tue, Sep 28, 2010 at 7:43 PM, Joe Niski 
> <joe.ni...@nwea.org><mailto:joe.ni...@nwea.org> wrote:
> > But using the default store-based cursor requires disabling Producer
> Flow Control, correct?


Reply via email to