Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Added some details on the store (persistence) modules to the FAQ

...

They are not allocated to a specific client

Persistence

Does Qpid support persistence?

Yes, there are third-party (non-Apache) modules for both C++ and Java. Historically, BDB has been used to provide persistence for both C++ and Java. However, this has created a licensing conflict with Apache, and thus the store modules are maintained off-site.

Where do I get the persistence modules?

The persistence modules may be obtained through anonymous subversion at the following locations:

C++: http://anonsvn.jboss.org.repos/rhmessaging/store/trunk/cppImage Added
Java: http://anonsvn.jboss.org/repos/rhmessaging/store/trunk/java/bdbstoreImage Added

How do I build the persistence module from subversion checkouts?

C++

The README file contains detailed instructions, but here is a summary:

  1. Make sure that both the db4-devel and libaio-devel packages are installed prior to building.
  2. Make sure that qpid is built and you know the location of the qpid directory (ie the top-level directory containing the python and cpp sub-directories).
  3. In the store directory, run:
    Code Block
    
    ./bootstrap
    ./configure --with-qpid-checkout=/abs/path/to/qpid/dir
    make
    
  4. When built, the store library msgstore.so will be located in the lib/.libs directory.

Java

TODO

How do I use the persistence store module?

C++

  1. Start the broker making sure that the store module is loaded, ie
    Code Block
    
    qpidd --load-module=/path/to/msgstore.so --data-dir=/path/to/store-files ...
    
  2. Make sure that queues that will handle persistent messages are set durable.
  3. For each message sent to a durable queue, make sure that it is set durable.
Note
titleNote: Existing queues cannot be made persistent

If a queue has been declared without persistence, doing so again with persistence enabled while the old queue still exists in the broker will be ignored. Make sure that when a queue is declared persistent, there is no non-persistent queue of the same name in existence.

Java

TODO

How do I configure the store?

C++

The broker loads help information from each module. To see the help options for the store, load the store module and specify help:

Code Block

qpidd --load-module /abs/path/to/store/lib/.libs/msgstore.so --help

Note that a set of journal files will be created for each queue declared and marked persistent. Each persistent queue has its own private journal. These are stored in the data directory by default (ie it uses the brokers --data-dir setting) or can be overridden with the --store-dir option. Note that if the broker is started with the --no-data-dir option, then no store default exists, and the --store-dir option MUST be specified.

The options that can be set control the store files - or "store geometry". These include the size and number of files that make up the journal for each queue. The --num-jfiles options sets the number of files to use (between 4 and 64) and the --jfile-size-pgs sets the size of the file in 64kiB blocks.

Java

TODO

Wiki Markup
\[C++ store\] What is a RHM_IORES_ENQCAPTHRESH error?

The journal ran out of space. The journal has a fixed capacity set by the journal file size and number of files. When an attempt to write a record causes the journal to exceed the 80% threshold, then the enqueue is rejected with this error code. Dequeues may continue, however, as these free up space in the journal. Once space has been freed up, enqueues may continue as normal.

This error may be caused by:

  1. The journal is too small for the message depth. The journal must be made large enough to hold all of the messages you expect to be on the queue at any one moment (a worst-case scenario). Make the journal capacity larger through the use of the --num-jfiles and --jfile-size-pgs parameters.
    Info
    titleRule of thumb for sizing the journal

    Make the journal twice the size of all the messages you need to store at any one moment in time.

  2. Messages are not being dequeued as expected. Since the store is a circular file buffer, if one un-dequeued (not consumed) message remains, it can eventually "block" the storage of new messages as the buffer gets overwritten.

How To

C++

How to use RDMA with Qpid

...

If you are running from vendor RPMs, this should work automatically.

Java

Children Display
pageqpid:Qpid Java How To