JBoss.org Community Documentation

7.3.9. org.jboss.mq.server.MessageCache

The server determines when to move messages to secondary storage by using the org.jboss.mq.server.MessageCache MBean. The configurable attributes are as follows:

  • CacheStore : The JMX ObjectName of the service that will act as the cache store. The cache store is used by the MessageCache to move messages to persistent storage. The value you set here typically depends on the type of persistence manager you are using.

  • HighMemoryMark : The amount of JVM heap memory in megabytes that must be reached before the MessageCache starts to move messages to secondary storage.

  • MaxMemoryMark : The maximum amount of JVM heap memory in megabytes that the MessageCache considers to be the max memory mark. As memory usage approaches the max memory mark, the MessageCache will move messages to persistent storage so that the number of messages kept in memory approaches zero.

  • MakeSoftReferences : This controls whether or not the message cache will keep soft references to messages that need to be removed. The default is true.

  • MinimumHard : The minimum number of the in memory cache. JBoss won't try to go below this number of messages in the cache. The default value is 1.

  • MaximumHard : The upper bound on the number of hard references to messages in the cache. JBoss will soften messages to reduce the number of hard references to this level. A value of 0 means that there is no size based upper bound. The default is 0.

  • SoftenWaitMillis : The maximum wait time before checking whether messages need softening. The default is 1000 milliseconds (1 second).

  • SoftenNoMoreOftenThanMillis : The minimum amount of time between checks to soften messages. A value of 0 means that this check should be skipped. The default is 0 milliseconds.

  • SoftenAtLeastEveryMillis : The maximum amount of time between checks to soften messages. A value of 0 means that this check should be skipped. The default is 0.

Additional read-only cache attribute that provide statistics include:

  • CacheHits : The number of times a hard referenced message was accessed

  • CacheMisses : The number of times a softened message was accessed.

  • HardRefCacheSize : The number of messages in the cache that are not softened.

  • SoftRefCacheSize : The number of messages that are currently softened.

  • SoftenedSize : The total number of messages softened since the last boot.

  • TotalCacheSize : The total number of messages that are being managed by the cache.