Chapter 4. Using Persistence with MRG Messaging

Chapter 4. Using Persistence with MRG Messaging

A persistence library allows MRG Messaging to store messages and queue configuration, ready to be reloaded in the event of machine or network failure. When the persistent store module is loaded, it allows messages and other persistent state information to be recovered when a broker is restarted.

In order for messages to be stored the persistence store must be loaded. By default, the persistence store is loaded if the libbdbstore.so library is located in /usr/lib/qpidd. See Table 4.1, “Persistence Options” for options on how to change this behaviour.

In addition to loading the persistent store, queues and messages also need to be identified as durable. This can be done in the client application or by using the qpid-config command line tool. See the MRG Messaging Tutorial for more information about creating client applications.

Important

If the persistence module is not loaded, messages and the broker state will not be stored to disk, even if the queue and messages sent to it are marked persistent.

Persistence Options
--store-directory DIRECTORY Specifies the directory used for storage of peristence configuration information. The default is /var/lib/qpidd.
Table 4.1. Persistence Options

Important

Only one running broker can access a data directory at a time. If another broker attempts to access the data directory it will fail with an error stating “Exception: Data directory is locked by another process.