JMS JCA Resource adapter for RabbitMQ

1,061 views
Skip to first unread message

mus...@gmail.com

unread,
May 20, 2015, 11:35:13 AM5/20/15
to jboss-gene...@googlegroups.com
Hi,
We are trying to set up RabbitMQ as our messaging broker. We have message driven beans in JBOSS 7 that would consume messages from this RabbitMQ queue.

Since rabbitMQ implements AMQP, I have installed the JMS client that they have provided-- https://www.rabbitmq.com/devtools.html

I am trying to setup a JMS JCA resource adapter in  JBOSS 7 to this RabbitMQ connection/queue. I am using the generic JMS JCA RA jar and rar files created by this group. Would it work? has anyone tried this before?
If yes, do you have the sample resource adapter connections?

Any pointers in this regard would be helpful!!

Thanks,
musheka

Justin Bertram

unread,
May 20, 2015, 12:53:39 PM5/20/15
to jboss-gene...@googlegroups.com
Having a JMS client implementation is the first step.  The second step is having a JNDI client implementation.  JNDI is essential for integration as there is no other generic way for the generic JMS JCA RA to get references to the JMS connection factory and destination.  Does RabbitMQ have a JNDI implementation?

mus...@gmail.com

unread,
May 20, 2015, 1:06:26 PM5/20/15
to jboss-gene...@googlegroups.com
Yes. I have the JMS client installed. For JNDI they don't have any JNDI client implementation. Instead they are advising the setup in this link to setup the JMS objects in JNDI. 
I am not sure if it will work.


Thanks,
musheka

mus...@gmail.com

unread,
May 20, 2015, 1:13:02 PM5/20/15
to jboss-gene...@googlegroups.com
Hi Justin,
In that link, you can view the section named "Using the JMS Client for vFabric RabbitMQ ". There they have highlighted the steps to setup JMS objects in JNDI. I ma not sure if it is good enough for JBOSS though.

musheka

Justin Bertram

unread,
May 20, 2015, 1:46:14 PM5/20/15
to jboss-gene...@googlegroups.com
If RabbitMQ doesn't have a JNDI server implementation then you'll have to get the connection factory and destination objects insert into the local JBoss AS JNDI namespace.  You can probably do this with an "object-factory."  See more at https://docs.jboss.org/author/display/WFLY8/Naming+Subsystem+Configuration.

mus...@gmail.com

unread,
May 22, 2015, 4:30:33 PM5/22/15
to jboss-gene...@googlegroups.com
Thanks for the info Justin. I understand setting up the connection factory in the JNDI namespace. The JMS client comes with a connection factory. I am not sure about destination objects though. Also I am unclear about setting up the resource adapters in my scenario.
Any examples in this regard will be helpful.

Justin Bertram

unread,
May 22, 2015, 4:42:07 PM5/22/15
to jboss-gene...@googlegroups.com
There are several resource adapter configuration examples in the documentation.  The only real difference between them is the "JndiParameters" and "ConnectionFactory" values.  If you're going to configure the RA to do the JNDI lookup locally then you'll just leave the "JndiParameters" blank.  The "ConnectionFactory" value will just be the JNDI name you've given to your RabbitMQ connection factory.

mus...@gmail.com

unread,
May 27, 2015, 10:55:42 AM5/27/15
to jboss-gene...@googlegroups.com
Thanks a lot for the info Justin! I will try your suggestions and get back in case of any issues.
Reply all
Reply to author
Forward
0 new messages