You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by "enes.caglar" <en...@hotmail.com> on 2016/08/31 23:42:43 UTC

Persistent Message useCache Setting

Hi,

I set useCache parameter to false for all queues with policyEntry in
activemq.xml config file. And if this setting is true persistent messages
are cached for fast retrieval from store so if it is false then all
persistent messages should be kept in the data store not in memory. 

I set this key in activemq.xml config file with queue policyEntry:

<policyEntry queue=">" optimizedDispatch="false" producerFlowControl="false"
cursorMemoryHighWaterMark="50" memoryLimit="200 mb" useCache="false" >

But even if the setting is false broker still keeps these messages in the
memory. I am trying to load big messages and memory usage keeps increasing
until it reaches to the maximum memoryUsage (defined in activemq.xml under
systemUsage) limit. After that messages are written in data storage. 

But the problem is after these messages are written in data storage after I
restart the broker it fails with the following exception. As far as I
understand broker is trying to read all messages into memory and it exceeds
maximum java heap space. I am trying to prevent storing persistent messages
in the memory.

Exception in thread "ActiveMQ Broker[localhost] Scheduler"
java.lang.OutOfMemory
Error: Java heap space





--
View this message in context: http://activemq.2283324.n4.nabble.com/Persistent-Message-useCache-Setting-tp4716046.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.