technology from back to front

OpenAMQ’s JMS client with RabbitMQ server

OpenAMQ has released their JMS client for using JMS with AMQP-supporting brokers. This afternoon I experimented with getting it running with RabbitMQ.

After a simple, small patch to the JMS client code, to make it work with the AMQP 0-8 spec that RabbitMQ implements (rather than the 0-9 spec that OpenAMQ implements), the basic examples shipped with the JMS client library seemed to work fine. The devil is no doubt in the details, but no problems leapt out at me.

To get it going, I checked it out using Git (`git clone
git://github.com/pieterh/openamq-jms.git`). Compilation was as simple as running `ant`. Kudos to the OpenAMQ team for making the build process so smooth! (Not to mention writing a great piece of software :-) )

The changes to make it work with AMQP 0-8 were:

– retrieving the 0-8 specification XML

– changing the JMS client library’s `build.xml` file to point to the downloaded file in its `generate.spec` variable

– changing one line of code in `src/org/openamq/client/AMQSession.java`: in 0-8, the final `null` argument to `BasicConsumeBody.createAMQFrame` must be omitted

– re-running the `ant` build

After this, and creating a `/test` virtual-host using RabbitMQ’s `rabbitmqctl` program, the OpenAMQ JMS client examples worked fine, as far as I could tell.

rabbitmqctl add_vhost /test
rabbitmqctl set_permissions -p /test guest ‘.*’ ‘.*’ ‘.*’

You can download the patch file I applied to try it yourself. Note that you’ll need to put the correct location to your downloaded `amqp0-8.xml` file into build.xml.

by
tonyg
on
16/03/09
  1. Tony,

    Good news. Feel free to send us patches to make the code work with both 0.8 and 0.91, if you like.

    -Pieter

  2. Sebastien Plisson
    on 20/01/10 at 11:35 pm

    I just tried this and there are missing files from the git repository is:
    org.openamq.framing.ChannelCloseBody

    Where are they gone ?

  3. Sebastien Plisson
    on 20/01/10 at 11:42 pm

    Nevermind, I had mispelled the name of the amqp spec file

  4. L Martins
    on 02/02/10 at 10:10 pm

    I’m trying to get Drools to work with RabbitMQ, and unfortunately the drools JMS pipeline requires JNDI objects. Has anybody got an example of JNDI entries for topics, connectionFactories, etc working with this API?

  5. David Sims
    on 10/06/10 at 2:00 am

    I am looking for example JNDI entries required for tomcat + blazeds integration.

    Do you have any examples available?

  6. I am trying to use RabbitMQ from within GlassfishESBV2.2′s (GlassfishV2.x) resource adapter but with no success.
    I’ve tried the genericra bundled with Glassfish, deployed the resource adapter, created the JNDI resources for Queue, QueueConnectionFactory and QueueConnectionFactoryPool but I keep with the problem of instanciating the AMQQueue, which has no default constructor …

    And yes, I really need a JMS Provider API for RabbitMQ, I’m trying to use JBI and the JMS Binding Connectors.

    Anyone has managed this?

  7. I am a newcomer to OpenAMQ and RabbitMQ.
    Please tell me more detail to run OpenAMQ JMS client with RabbitMQ?

  8. paladin1988
    on 26/07/11 at 12:46 pm

    it’s free??

    l’m learning how to use it and our project need , l have to read the english document.

    l like the rabbit and cat

  9. liuruoze
    on 05/03/13 at 2:08 am

    thankyou very much, i think i may use that. I hava an idea to change the MOM from WebsphereMQ to RabbitMQ, almost.

 
 


two × = 4

2000-14 LShift Ltd, 1st Floor, Hoxton Point, 6 Rufus Street, London, N1 6PE, UK+44 (0)20 7729 7060   Contact us