On 07/07/2011 04:40 PM, Tom Arnold wrote:
Hi all,

I'm interested in talking to a RabbitMQ broker through a JMS client.

It looks like Rabbit's interop page (
http://www.rabbitmq.com/interoperability.html) is a bit out of date (Rabbit
2.0.0). I've tried using Qpid's JMS client without much success (it doesn't
seem to want to negotiate protocol version), and OpenAMQ's JMS client seems
to have disappeared.

Does anyone have Qpid (or any other JMS client) working with Rabbit?

I had a go at this... but without real success. The first thing is to make sure you have the virtual host correctly set. I set it to '/' and with guest/guest managed to connect.

However I have as yet been unable to send messages. To connect to RabbitMQ the client has to use AMQP 0-9-1 and my initial attempts to sent to a queue or topic defined in jndi properties met with the following error:

java.lang.UnsupportedOperationException: The new addressing based sytanx is not supported for AMQP 0-8/0-9 versions

If I use the first two types of configuration mentioned in the example at https://cwiki.apache.org/qpid/how-to-use-jndi.html (i.e. queue.xyz = or topic.xyz = ) then the 0-9-1 path incorrectly issues exchange-declares without the passive flag set (for amq.direct or amq.topic respectively).

I have as yet been unable to use the third form (which I believe should in theory allow me to use another exchange and workaround the above bug). If I specify -Dqpid.dest_syntax=BURL then I get an error looking up my JNDI name. If I don't have that system property I get the above error on incorrect 'sytanx'.

If I then try using Session.createTopic("BURL:topic://amq.topic?routingkey='stocks.nyse.ibm'") ('url' taken from https://cwiki.apache.org/qpid/bindingurlformat.html)

I get: java.net.URISyntaxException: Error occured while parsing URL at index 47: topic://amq.topic?routingkey='stocks.nyse.ibm'%^
Caused by: java.lang.ArrayIndexOutOfBoundsException: 47
at org.apache.qpid.url.BindingURLParser.extractExchangeName(BindingURLParser.java:227)

I get the same if I remove the 'BURL:' and go back to -Dqpid.dest_syntax=BURL. Likewise the same type of error occurs if I change the binding url to another example (direct://amq.direct/SimpleQueue) and use createQueue() instead of createTopic().

At this point I am out of ideas; can anyone suggest a way of getting something working here? Is there a JIRA open for the non-passive declare problem?



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:[email protected]

Reply via email to