activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Torsten Mielke <tors...@fusesource.com>
Subject Re: Producer Flow Control best practices
Date Mon, 28 Nov 2011 15:23:42 GMT

On Nov 28, 2011, at 3:34 PM, Ishitori wrote:

> I've encountered a problem of hanging up of the producers and I found that it
> is related to "Producer Flow Control". I made a quick fix via disabling
> producerFlowControl at all. But now I wonder what should I do, because I
> don't really want producers to use all available disk space.
> 
> The questions are:
> 
> 1) I send persistent messages, but I set AsyncSend to true. Does it mean
> that messages are stored in-memory as they were non-persistent? What will
> happen a broker-node in failover cluster got restarted? Will I lose these
> in-memory messages?

I don't think that sending a persistent msg async will make it non-persistent. From 
http://activemq.apache.org/async-sends.html:

"you can enable the use of async sends to increase throughput even when using persistent messages."

So a persisten msg remains persistent even when sent async. You should use the appropriate
JMS APIs to create and send non-persistent msgs.

In general you need to decide whether you want to block producers when the broker runs full
or if you have enough disk space to deal with temporary peak times where consumers are slow.
These approaches can be combined as well: You may want to configure for a fairly large persistence
store and temp storage (for non-persistent msgs) and in addition configure for producer flow
control. So that for most peak times the large size of the stores will be sufficient and only
for the rare cases that its not sufficient, you will need to flow control producers.

> 
> 2) Should I use vmQueueCursor if I enable producerFlowControl and set
> memoryLimit to 512mb? Will it increase the perforamnce?
> 
> 3) There are also systemUsage section that contains memoryUsage node. Should
> I increase that value as well if I set 512mb memory limit? I believe it is
> the global option that controls total amount of the memory that could be
> used to store messages. Am I right?

The systemUsage settings should generally by adjusted to fit your needs. Make sure you *don't*
set a memoryUsage limit that is equal or higher the size of the JVM heap (-Xmx setting to
Java). 
See 
http://activemq.apache.org/producer-flow-control.html
for more information


Torsten Mielke
torsten@fusesource.com
tmielke@blogspot.com




Mime
View raw message