Connecting to RabbitMQ using Qpid JMS Translation library

520 views
Skip to first unread message

Alexandre Vázquez

unread,
Mar 1, 2015, 4:02:48 PM3/1/15
to rabbitm...@googlegroups.com
Hi everybody!

First of all I want to apologize to everybody for this interrumption but I want to expose the experiment I was doing and the problem I'm facing expecting some of you could help me to solve it. Ok, I'm trying to connect with RabbitMQ using the Qpid JMS translation library. I am aware that the RabbitMQ is an AMQP message broker and not a JMS one but I want to test if the software I'm using that has an out-of-the-box way to talk with JMS server providers could talk with RabbitMQ the same way. By the way, if you are interested I'm using TIBCO BW as the "main program" or "the integration program" whatever you want to call it, it is the software that creates the JMS connection.

First of all, a bunch of version I'm using:
RabbitMQ 3.4.0, Erlang R16B03 - To be more exactly I'm using the docker container definition from tutum/rabbitmq. 

Qpid Libraries: (two atempts)
http://www.apache.org/dyn/closer.cgi/qpid/0.30/binaries/qpid-client-0.30-bin.tar.gz (for previous version of the standard 0.8.x and 0.9.x)

First of all I want a success testing the connection using the following configuration:
JNDI Context Factory: org.apache.qpid.jndi.PropertiesFileInitialContextFactory
JNDI Context URL: C:/Users/developer/Desktop/test.properties.txt

And the contest of the test.properties.txt file is:

connectionfactory.SBCF = amqp://admin:W4co4r4oLkpk@/?brokerlist='tcp://192.168.79.128:5672'
destination.QUEUE = queue1

Ok, As I told before when I try to test the connection using the software (TIBCO BW) tool the result is OK, but when I want to try it I was facing the following internal RabbitMQ error when I'm trying to create the "JMS Session":

BW-JMS-100039 Job-30000 Error in [Process Definition (1).process/JMS Queue Sender]
There was an unexpected error while sending a message.
caused by: com.tibco.plugin.share.jms.impl.JMSExceptionWrapper: javax.jms.IllegalStateException: Session has been closed
Caused by: javax.jms.IllegalStateException: Session has been closed
Caused by: org.apache.qpid.AMQException: Exception thrown against AMQConnection:
Host: 192.168.79.128
Port: 5672
Virtual Host:
Client ID: VMWareVM1425243648454
Active session count: 1: org.apache.qpid.AMQDisconnectedException: Server closed connection and reconnection not permitted. [error code 541: internal error]
Caused by: org.apache.qpid.AMQDisconnectedException: Server closed connection and reconnection not permitted.


So, the question is simple and really there are two of them:

1.- Anyone has any idea about this error, what is the cause of it and how to solve it?
2.- Anyone has get a success trying to talk with a JMS Client library using the Qpid Libraries to do the translation for connect to RabbitMQ?

Thanks for your incredible help and once again sorry for bothering you!!!




Michael Klishin

unread,
Mar 1, 2015, 4:11:01 PM3/1/15
to rabbitm...@googlegroups.com, Alexandre Vázquez
On 2 March 2015 at 00:02:49, Alexandre Vázquez (alexandr...@gmail.com) wrote:
> 1.- Anyone has any idea about this error, what is the cause of
> it and how to solve it?

Check RabbitMQ log files first. Almost certainly the Qpid library implements
a different version of AMQP (RabbitMQ primarily uses 0-9-1, 1.0 is available as a plugin)
but the error message does not provide enough information to tell for sure.

> 2.- Anyone has get a success trying to talk with a JMS Client library
> using the Qpid Libraries to do the translation for connect to
> RabbitMQ?

I'm personally unaware of such cases.

RabbitMQ has a JMS-compatible client of its own, it comes with the RabbitMQ subscription
from Pivotal. 
--
MK

Staff Software Engineer, Pivotal/RabbitMQ

Alexandre Vázquez

unread,
Mar 1, 2015, 4:37:20 PM3/1/15
to rabbitm...@googlegroups.com, alexandr...@gmail.com
Hi Michael,

First of all, thank you for you quickly reply, I really appreciate it.

Also, thank for your advice because I think you are really right about the problem:

I've been looking through the log files and found this entries:

"=INFO REPORT==== 1-Mar-2015::21:34:13 ===
accepting AMQP connection <0.500.0> (192.168.79.129:50745 -> 172.17.0.4:5672)

=ERROR REPORT==== 1-Mar-2015::21:34:13 ===
closing AMQP connection <0.500.0> (192.168.79.129:50745 -> 172.17.0.4:5672):
{bad_version,{1,1,0,10}}
"

So, Even when the Qpid JMS Library tell that it works with 0.8x and 0.9x AMQP providers there is some kind of misunderstanding between them. 

Only to finish this thing: what does mean the tuple {1,1,0,10} (1.1 version??)

Thanks once again!!

Michael Klishin

unread,
Mar 1, 2015, 5:24:16 PM3/1/15
to rabbitm...@googlegroups.com, Alexandre Vázquez
On 2 March 2015 at 00:37:21, Alexandre Vázquez (alexandr...@gmail.com) wrote:
> =ERROR REPORT==== 1-Mar-2015::21:34:13 ===
> closing AMQP connection <0.500.0> (192.168.79.129:50745
> -> 172.17.0.4:5672):
> {bad_version,{1,1,0,10}}
> "
>
> So, Even when the Qpid JMS Library tell that it works with 0.8x
> and 0.9x AMQP providers there is some kind of misunderstanding
> between them.
>
> Only to finish this thing: what does mean the tuple {1,1,0,10}
> (1.1 version??)

I suspect it's 0.10.

You may be looking at outdated documentation (not entirely unheard of with Qpid).

I can't make any promises about our JMS client being open sourced but it may happen one day.
For now, feel free to contact in...@rabbitmq.com about obtaining a commercial distribution
license that includes the JMS client.

I hope it will be available to everybody free of charge sooner rather than later. 
Reply all
Reply to author
Forward
0 new messages