JBossMQ Message Cache Configuration
This service is responsible for pushing messages onto disk when memory is running short.
It is configured alongside the persistence manager.
The default configuration can be found in deploy{-hasingleton}/jms/hsqldb-jdbc2-service.xml
or alternates can be found in docs/examples/jms
Default Configuration
<mbean code="org.jboss.mq.server.MessageCache" name="jboss.mq:service=MessageCache"> <attribute name="HighMemoryMark">50</attribute> <attribute name="MaxMemoryMark">60</attribute> <attribute name="CacheStore">jboss.mq:service=PersistenceManager</attribute> </mbean>
Configurable Attributes
HighMemoryMark
- the message cache starts softening messages when the heap size reaches this valueMaxMemoryMark
- the message cache becomes very aggressive when the heap reaches this valueCacheStore
- the object name of the delegate service that actually stores the messages in a permenant storeMinimumHard
- the minimum number of hard references to keep in memory (default 2 - from JBoss 3.2.4)MaximumHard
- the maximum number of hard references to keep in memory (default 0 means infinite - from JBoss 3.2.6)SoftenWaitMillis
- the maximum wait time before checking whether messages need softening (default 1000 milliseconds - from JBoss 3.2.4)SoftenNoMoreOftenThanMillis
- the minimum amount of time between checks to soften messages (default 0 milliseconds - from JBoss 3.2.4)SoftenAtLeastEveryMillis
- the maximum amount of time between checks to soften messages (default 0 milliseconds means infinite - from JBoss 3.2.6)MakeSoftReferences
- whether to keep soft references to messages that have backed up to the cache store, when false this will force a reload from the cache on the next access if it was softened (default true - from JBoss 3.2.6)
Informational Attributes
HardRefCacheSize
- the number of messages that are not softenedSoftRefCacheSize
- the number of messages that are currently softenedSoftenedSize
- the total number of messages softened since the last bootCacheMisses
- the number of times a softened message was accessedCacheHits
- the number of times a hard referenced message was accessedCurrentMemoryUsage
- this is the memory used by the JVM, not just the memory used by the cache
Legacy File Cache Store
A legacy cache store used with file persistence. The big disadvantage is that it does not communicate
with the file persistence manager and so you could have two copies of the message on disk. Not included in 4.0.2 (and beyond?).
Default Configuration
<mbean code="org.jboss.mq.pm.file.CacheStore" name="jboss.mq:service=CacheStore"> <attribute name="DataDirectory">tmp/jbossmq</attribute> </mbean>
Attributes
DataDirectory
- the location where softened messages are stored
Comments