LibraryToggle FramesPrintFeedback

The KahaDB message store is configured by placing a kahaDB element in the persistenceAdapter element of your broker's configuration. The kahaDB element's attributes are used to configure the message store.

The attributes, listed in Table 2.1, all have reasonable default values, so you are not required to specify values for them. However, you will want to explicitly specify the location of the message store's data files by providing a value for the directory attribute. This will ensure that the broker will not conflict with other brokers.

Example 2.1 shows a basic configuration of the KahaDB message store. The KahaDB files are stored under the activemq-data directory.


Table 2.1 describes the attributes that can be used to configure the KahaDB message store.

Table 2.1. Configuration Properties of the KahaDB Message Store

AttributeDefault ValueDescription
directory activemq-dataSpecifies the path to the top-level folder that holds the message store's data files.
indexWriteBatchSize 1000Specifies the number of B-tree indexes written in a batch. Whenever the number of changed indexes exceeds this value, the metadata cache is written to disk.
indexCacheSize 10000Specifies the number of B-tree index pages cached in memory.
enableIndexWriteAsync falseSpecifies if kahaDB will asynchronously write indexes.
journalMaxFileLength 32mbSpecifies the maximum size of the data log files.
enableJournalDiskSyncs trueSpecifies whether every non-transactional journal write is followed by a disk sync. I if you want to satisfy the JMS durability requirement, you must also disable concurrent store and dispatch.
cleanupInterval 30000Specifies the time interval, in milliseconds, between cleaning up data logs that are no longer used.
checkpointInterval 5000Specifies the time interval, in milliseconds, between writing the metadata cache to disk.
ignoreMissingJournalfiles falseSpecifies whether the message store ignores any missing journal files while it starts up. If false, the message store raises an exception when it discovers a missing journal file.
checkForCorruptJournalFiles falseSpecifies whether the message store checks for corrupted journal files on startup and tries to recover them.
checksumJournalFiles falseSpecifies whether the message store generates a checksum for the journal files. If you want to be able to check for corrupted journals, you must set this to true.
archiveDataLogs falseSpecifies if the message store moves spent data logs to the archive directory.
directoryArchive nullSpecifies the location of the directory to archive data logs.
databaseLockedWaitDelay 10000Specifies the time delay, in milliseconds, before trying to acquire the database lock in the context of a shared master/slave failover deployment. See Shared File System Master/Slave in Clustering Guide.
maxAsyncJobs 10000Specifies the size of the task queue used to buffer the broker commands waiting to be written to the journal. The value should be greater than or equal to the number of concurrent message producers. See Concurrent Store and Dispatch.
concurrentStoreAndDispatchTopics falseSpecifies if the message store dispatches topic messages to interested clients concurrently with message storage. See Concurrent Store and Dispatch.
concurrentStoreAndDispatchQueues trueSpecifies if the message store dispatches queue messages to clients concurrently with message storage. See Concurrent Store and Dispatch.

Comments powered by Disqus