Hi, I have noticed that ActiveMQ is keeping the List of Message objects in memory after persisting them in the DB when there is no consumer on the queue. What I did is a simple test, I kept on sending persistent messages to a queue with no active consumers. The broker kept on using more memory and reached to the max. The heap dump shows that all messages sent to the queue are also in memory. Why are they being held in memory? Is this normal? If so, what is the need to have everything in memory even after persisting them to the DB? I would assume holding a few messages ready to be dispatched when a consumer comes along makes sense instead of retaining every message that sent to the queue.
The heap dump shows that the messages are in LinkedHashMap objecy of org.apache.activemq.broker.region.cursors.QueueStorePrefetch class. I can attach the Memory Analyzer screen shots of this heap dump, if you are interested. I am using ActiveMQ 5.2. Please let me know if this behavior is a bug or if its expected and why. Thanks, Rajani. -- View this message in context: http://www.nabble.com/Messages-are-left-in-memory-with-JDBC-persistance-for-queues-when-no-consumers-tp25069583p25069583.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.