Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Wiki Markup
h1. {color:red}
This is a draft 
{color}

h1. Background 

[HermesJMS|http://hermesjms.com] is a console for JMS messaging and supports QPID. This page shows how to configure Hermes with QPID.

As the QPID codebase is moving quickly forward at the moment and there are some workarounds in place within Hermes to support it, you should ensure that you download the latest Hermes build from [HEAD|http://hermesjms.com/patches]

Finally, you should familiarise youself with Hermes via the tutorials on the website before continuing. Look at the Tibco EMS and JBoss tutorials for how to use connection factories directly or via JNDI. This page uses them directly.

h1. Configuring 

To get QPID working, you need to configure the libraries to load via the GUI. Hermes loads up each provider in its own classloader to avoid any dependency problems across providers. This tutorial assumes you've downloaded and built QPID via the {{ant dist}} task.

h2. Configure the CLASSPATH 

Start Hermes and select _Options -> Configuration_ and click on the _Providers_ tab. Create a new classpath group (right click for this) and add the following JARS to it:

[http://hermesjms.com/people/colin/images/hermes_qpid_classpath.jpg]


When asked, choose the scan option to get Hermes to search the libraries to find any classes that implement JMS connection factory interfaces, this is essential for the next step.

Finally, click OK.

h2. Configure The Session 

Right click on the tree of sessions and select _New -> Session_. In the session combo box at the top put in the name you want, for example QPID. Its important the next thing you do is select the loader so the dialog can find any connection factories.

In the _Class_ combo box choose the {{org.apache.qpid.client.AMQConnectionFactory}}.

Next, in the property list for the connection factory, right click to add new properties and use the combo to select which one and add their value.

Finally, and very importantly, check the _Use consumer_ checkbox at the top. QPID does not support JMS queue browsing but Hermes lets you use a {{{MessageConsumer}}} instead. Remember of course that if an consumer is currently active you will not get the real queue content, Hermes uses a transacted session and some messages may be uncommitted in another consumers session.

h2. Add Destinations 

Currently you must manually add queues and topics. You can add them now or later from the _New queue_, _New topic_ or _New durable subscription_ actions in the toolbar. If you add them now then right click in the destination list to add them.

The session and destinations should look something like this. Once happy, click OK.

[http://hermesjms.com/people/colin/images/hermes_qpid_session.jpg]

h2. Try a Browse 

Finally, double click on a queue or topic in the newly created session in the tree and you should get see something like the following (assuming you've got something in the queue or being published in the topic to see):

[http://hermesjms.com/people/colin/images/hermes_qpid_bytes.jpg]

This message is a JMS {{BytesMessage}} so there not much to see until you see its really a [FIX |http://fixprotocol.org] message and clicking on the FIX tab reveals it.

[http://hermesjms.com/people/colin/images/hermes_qpid_fix.jpg]

h1. Other Features

Refer to the [HermesJMS|http://hermesjms.com] site for how to use all the other feature of HermesJMS with QPID.

h1. Issues 

1. Queues must already exist before you browse them.

1. {{get/setJMSDestination()}} is not supported on a message so {{Unknown}} is shown.