activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From patsfan <apvei...@gmail.com>
Subject Question regarding producer flow control / cursor algorithm...
Date Tue, 03 Jul 2012 18:44:57 GMT
Am trying to improve my understanding of the producer flow control feature. 
We are using the examples shipped with 5.3.2 to send and receive messages
(ProducerTool and ConsumerTool) to help improve understanding.  One set of
ProducerTool/Consumer Tool is producing/consuming on a QUEUE called "BOO". 
Another set is producing/consuming on a QUEUE called "FOO".  The JMS
Messages are tagged as persistent. Policy entries for each is below.

<destinationPolicy>

<policyEntry queue="BOO" producerFlowControl="true" memoryLimit="20mb">
</policyEntry>

<policyEntry queue="FOO" producerFlowControl="true" memoryLimit="1mb">
</policyEntry>

</destinationPolicy>

The <systemUsage> element is commented out and my understanding is that the
defaults are as such:
Memory Limit 67108864     (64MB)
Store Limit  107374182400 (100 GB)
Temp Limit   107374182400 (100 GB)

Now to describe behavior.  The producer on queue FOO is slowed fairly
quickly and we see the following message in the activemq log:

INFO | Usage Manager Memory Limit reached on queue://FOO. 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

According to the documentation on cursors
(http://activemq.apache.org/message-cursors.html), the store based cursor is
used as a default:

"The default message cursor type in ActiveMQ 5.0 is Store based.  It behaves
as above."  Here is the explanation of the behavior of the Store based
cursor:

"When Message Consumers are both active and fast - keeping up with the
Message Producer(s) - messages are stored and then passed to a dispatch
queue in the broker associated with the Consumer"

and then it continues:

"If a Consumer becomes active after messages are pending from the store for
it, or it's slower than the producer, then messages are paged in to the
dispatch queue from a pending cursor:"

My questions are these:  

1. What is the determining factor(s) on when the "dispatch queue" is
considered full?

2. Related to the previous question, is the "dispatch queue" an in-memory
queue and is limited in size by
/destinationPolicy/policyMap/policyEntries/policyEntry/memoryLimit?  Or is
the throttling based on the amount of disk space being consumed (based on
memoryLimit)?

3.What is the limit of number of messages spooled to disk?  Is this limited
by the size as defined in /systemUsage/systemUsage/storeUsage?  What happens
if we hit this threshold?

Please let me know if you need any further details.

Thanks in advance...Al

--
View this message in context: http://activemq.2283324.n4.nabble.com/Question-regarding-producer-flow-control-cursor-algorithm-tp4653725.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
View raw message