You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 15 Next »

Qpid Persistence Options

There are currently two options for persistence in Qpid, as shown in the table below.

Persistence Style

Provider

Advantages

Disadvantages

In-Memory

Qpid MemoryMessageStore

Comes as part of the Qpid package

Not persistent

Derby DB Store

Qpid DerbyMessageStore

Allows persistence for larger messages/volumes

Limited testing reported

Berkeley DB Store

Berkeley project

Allows persistence for larger messages/volumes

Not Apache licensed

Using In-Memory Persistence

Using In-Memory persistence is the default when you install Qpid and requires no additional install/configuration.

Using Derby Message Store

Simply use the following Store class:

<store>
    <class>org.apache.qpid.server.store.DerbyMessageStore</class>
</store>

Using Berkeley DB Persistence

Install Berkeley DB

If you choose to use the Berkeley DB solution for scalability purposes then you should download & install version 3.1 from http://www.oracle.com/technology/software/products/berkeley-db/je/index.html

Amend your Qpid configuration to switch BDB on

The default Qpid configuration file can be found in the etc directory of your install and is named config.xml.

To use BDB, simply add the following element:

<store>
    <class>org.apache.qpid.server.store.berkeleydb.BDBMessageStore</class>
</store>

alternatively an example file is provided named persistent_config.xml

Install the Qpid bridge modules for Berkeley DB

You can either build the module from source which is available from the JBoss Site.

However, as a temporary measure, you can use the bridging modules from this page M1-BDBStore or M2-BDBStore. You should then ensure that this jar is included in the classpath for the broker (see more info below), along with the BDB jar (je-<version>.jar).

This can simply be done by editing the your classpath to add the two jars that you need and then pass an option into qpid-server to use your classpath.

So, first set your classpath to something like this:

CLASSPATH=$QPID_HOME/lib/qpid-incubating.jar:$QPID_HOME/lib/bdbstore.jar:$QPID_HOME/lib/je-<version>.jar

Then, run qpid-server passing the following additional flag:

qpid-server -run:external-classpath=first

You can check the classpath being used by adding an additional option to output the classpath in use:

qpid-server -run:external-classpath=first -run:print-classpath

alternatively you can edit the QPID_LIBS variable in the qpid-server script.

We hope to be able to integrate these modules into our Apache project shortly - but pending a discussion about the appropriate way to handle this process.

  • No labels