activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Posta <christian.po...@gmail.com>
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:

>From http://activemq.apache.org/what-is-the-prefetch-limit-for.html:

"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"


>From http://activemq.apache.org/producer-flow-control.html:

"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 <prashantpacy@gmail.com> 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:
> http://activemq.2283324.n4.nabble.com/Confusion-Prefetch-Limit-and-producerFlowControl-tp4666880.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>



-- 
*Christian Posta*
http://www.christianposta.com/blog
twitter: @christianposta

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