ActiveMQ memory usage
I have some questions about ActiveMQ memory usage...
First, let me explain what happened.
I have some queues (10+) which need to process thousands of messages every
The option *"flow producer control" is enabled* for every queue.
All my messages are *persistent *messages.
One day in my production environment my consumers weren't consuming messages
anymore while my queues were getting more messages from their producers.
I tried to restart my consumers: no effect.
Restart of ActiveMQ : no effect.
I noticed that the value of *"Memory percent used" was over 100* (something
Then I have allocated more memory to my VM and to my broker : it worked, my
consumers were consuming again.
My questions are the following :
1/ What I understood is that the memory used by ActiveMQ is linked to the
number of messages which are held in memory prior to be pushed to the
consumers. Is that right ? If no, how is it managed?
2/ For instance, if I have a prefetch size set to 100 in the consumer side,
so at most 100 mesasges will be in memory on the queue side? If no, how is
3/ How can I reach "Memory percent used : 160" ? The documentation I read
about this didn't really help me...
Is it because, for instance, if I have 10 queue, each queue needs 160MB in
memory while my JVM is only 1GB?
4/ If I set the "memoryLimit" attribute on the policyEntry element for a
queue, I guess the queue will not consume more than the amount of memory I
What if a message bigger than the memoryLimit comes in the queue?
Thanks a lot for your answers.
Have a good day.
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html