Version 11

    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 value

    • MaxMemoryMark
      - the message cache becomes very aggressive when the heap reaches this value

    • CacheStore
      - the object name of the delegate service that actually stores the messages in a permenant store

    • MinimumHard
      - 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 softened

    • SoftRefCacheSize
      - the number of messages that are currently softened

    • SoftenedSize
      - the total number of messages softened since the last boot

    • CacheMisses
      - the number of times a softened message was accessed

    • CacheHits
      - the number of times a hard referenced message was accessed

    • CurrentMemoryUsage
      - 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