LibraryLink ToToggle FramesPrintFeedback

Persistence Layer

Since ActiveMQ 5.4.0, the KahaDB message store is the default persistence layer used by ActiveMQ. The KahaDB message store is the latest evolution of ActiveMQ's native message store and it supersedes both the AMQ message store and the (original) Kaha message store.

If no configuration is specified for the KahaDB message store, an instance with default settings is automatically created for you.

The KahaDB message store can be configured explicitly using the kahaDB element inside the persistenceAdapter element, as follows:

<broker brokerName="broker" persistent="true" useShutdownHook="false">
  ...
  <persistenceAdapter>
    <kahaDB directory="activemq-data"/>
  </persistenceAdapter>
</broker>

If access to your KabaDB instance is slower than a certain threshold (500ms by default), ActiveMQ will log warning messages like the following:

Slow KahaDB access: cleanup took 1277 | org.apache.activemq.store.kahadb.MessageDatabase | ActiveMQ Journal Checkpoint Worker

You can suppress these warning messages by changing the threshold time to be consistent with you KahaDB access speed. To change the threshold time, set the org.apache.activemq.store.kahadb.LOG_SLOW_ACCESS_TIME Java system property to the new threshold time measured in milliseconds.

For more details about the KahaDB message store, see Using the KahaDB Message Store in Using Persistent Messages.