activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Posta <>
Subject Re: Confusion: Prefetch Limit and producerFlowControl
Date Fri, 10 May 2013 13:42:56 GMT
Prefetch does not imply blocking the producer. I recommend reading these
two wiki links closer. Below are the salient points:


"ActiveMQ uses a prefetch limit on how many messages can be *streamed to a
consumer* at any point in time. Once the prefetch limit is reached, no more
messages are *dispatched to the consumer* until the consumer starts sending
back acknowledgements"


"By 'flow control' we mean that if the broker detects that the *memory
limit for the destination*, or the temp- or file-store limits for the
broker, have been exceeded, then the flow of messages can be slowed down.
The producer will be either blocked until resources are available *or* will
receive a JMSException"

On Fri, May 10, 2013 at 2:46 AM, pp123 <> wrote:

> Hi ,
> I read about prefetch limit and found out that  the default value is : 100
> for Durable subscriber.  So for testing this what i am doing is : I have
> three subscriber in offline mode and I am trying to publish more than 100
> messages expecting after crossing the prefetch limit it should block the
> producer . I am publishing 100 messages with in 30 seconds so that it
> should
> be in memory. Also i have configured producer flow control as:
>                 <policyEntry topic=">" producerFlowControl="true"
> optimizedDispatch="true" memoryLimit="300kb"
>                         cursorMemoryHighWaterMark="30">
>                   <pendingMessageLimitStrategy>
>                     <constantPendingMessageLimitStrategy limit="0"/>
>                   </pendingMessageLimitStrategy>
>                 </policyEntry>
> One message size is : 1kb .So based on this configuration it is blocking
> producer after 150th publish. So i assumed may be the memory is 300kb
> =(150kb producer + 150kb consumer) . But according to prefetch limit it
> should block after 100 only . I am not able to find any documentation about
> these things .Please help .
> --
> View this message in context:
> Sent from the ActiveMQ - User mailing list archive at

*Christian Posta*
twitter: @christianposta

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message