h2 MessageStore Tool
We have a number of implementations of MessageStore this tool allows the interrogation of these stores while the broker is offline.
MessageStore Implementations
Introduction
Each of the MessageStore implementations provide different back end storage for their messages and so would need a different tool to be able to interrogate their contents. What this tool does is to utilise the Java broker code base to access the contents of the storage providing the user with a consistent means to inspect the storage contents. The tool allows the current messages in the store to be inspected and copied/moved between queues.
Usage
The tools-distribution currently includes a unix shell command 'msTool.sh' this script will launch the java tool.
The tool loads $QPID_HOME/etc/config.xml by default. If an alternative broker configuration is required this should be provided on the command line as would be done for the broker.
msTool.sh -c <path to different config.xml>
On startup the user is present with a command prompt
$ msTool.sh MessageStoreTool - for examining Persistent Qpid Broker MessageStore instances bdb$
Available Commands
The available commands in the tool can be seen through the use of the 'help' command.
bdb$ help +----------------------------------------------------------------+ | Available Commands | +----------------------------------------------------------------+ | Command | Description | +----------------------------------------------------------------+ | quit | Quit the tool. | | list | list available items. | | dump | Dump selected message content. Default: show=content | | load | Loads specified broker configuration file. | | clear | Clears any selection. | | show | Shows the messages headers. | | select | Perform a selection | | help | Provides detailed help on commands. | +----------------------------------------------------------------+ bdb$
A brief description is displayed and further usage information is shown with 'help <command>'
bdb$ help dump Dump selected message content. Default: show=content Usage:dump [show=[all],[msgheaders],[amqHeaders],[routing],[content]] [id=<msgid e.g. 1,2,4-10>] bdb$
Future Work
Currently the tool only works whilst the broker is offline. If this functionality was incorporated into the broker then a telnet functionality could be provided allowing online management.