LibraryLink ToToggle FramesPrintFeedback

Chapter 1. Introduction to ActiveMQ Persistence

Loss of messages is not acceptable in mission critical applications. ActiveMQ reduces the risk of message loss by using a persistent message store by default. Persistent messages are written to the persistent store when they are sent. The messages persist in the store until their delivery is confirmed. This means that, in the case of a system failure, ActiveMQ can recover all of the undelivered messages at the time of the failure.

The default message store is embeddable and transactional. It is both very fast and extremely reliable. ActiveMQ implements several different kinds of message store, including:

[Note]Note

The preceding persistence adapters are the most important ones. Some of the ActiveMQ persistence adapters—that is, the AMQ message store and the (original) Kaha persistence adapter—represent ealier versions of the built-in message store. They are kept for backward compatibiliby reasons, but are superseded by the KahaDB message store.

Persistence in ActiveMQ is controlled by a broker's XML configuration file. To change a broker's persistence behavior you modify the configuration's broker element's persistent attribute.


[Tip]Tip

By default, a broker's persistent attribute is set to true.

Example 1.1 shows a configuration snippet for turning off a broker's message persistence.


ActiveMQ offers a number of different persistence mechanisms besides the default message store. To use one of the alternative message stores, or to modify the default behavior of the default message store, you need to configure the persistence adapter. This is done by adding a persistenceAdapter element or a persistenceFactory element (depending on the kind of adapter you want to use) to the broker's configuration file.