Message driven beans with RabbitMQ

1,230 views
Skip to first unread message

mus...@gmail.com

unread,
May 19, 2015, 4:55:53 PM5/19/15
to rabbitm...@googlegroups.com
Hi,
We use message driven beans for responding to messages in the JMS Hornet Queue. We are now thinking of using RabbitMQ as our messaging layer. The EJb's run on JBOSS app server.
Is it feasible to use message driven beans with RabbitMQ in JBOss??

I can see that rabbitMQ does provide a JMS client. Should we work with that?

Thanks,
musheka

Michael Klishin

unread,
May 19, 2015, 5:10:34 PM5/19/15
to mus...@gmail.com, rabbitm...@googlegroups.com
The JMS client is provided as part of the commercial subscription. We are not aware of any limitations in it. So give it a try and let us know if you run into any issues.

MK
--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
To post to this group, send email to rabbitm...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Michael Klishin

unread,
May 19, 2015, 5:40:22 PM5/19/15
to mus...@gmail.com, rabbitm...@googlegroups.com
Please keep the list on CC. There are no docs on that from the RabbitMQ team.

MK

On 19/5/2015, at 14:15, mus...@gmail.com wrote:

Thanks Michael for the prompt reply.
Is there some way by which we could setup the message driven beans and the JBOSS to point to this rabbitMQserver?
Is there any documentation in this regard?

Thanks,
musheka

Rémi Bantos

unread,
May 30, 2017, 6:37:42 AM5/30/17
to rabbitmq-users, mus...@gmail.com
Hi,

I've done this pull request to RabbitMQ JMS Client project which allows to configure RabbitMQ JMS Connection Factory and  destination in Wildfly JNDI via standalone.xml using Naming Subsystem.

However, regarding Message Driven Beans, I've tried to use a generic JMS resource adapter to enable messages consuming via MDBs with a provider specific jms client, the RabbitMQ JMS Client library, following this tutorial.
My conclusion is the following: MDBs do not work with RabbitMQ JMS Client.

This is due to the fact that some optional JMS client specification features have not been implemented yet for this client. See RabbitMQ Jms client compliance page

Thus, when I configure a generic JMS resource adapter with RabbitMQ JMS client, I obtain errors, during MDBs processing such as:

2017-05-24 17:00:49,233 ERROR [org.jboss.resource.adapter.jms.inflow.JmsActivation] (default-threads - 7) Unable to reconnect org.jboss.resource.adapter.jms.inflow.JmsActivationSpec@2816dd0b(ra=org.jboss.resource.adapter.jms.JmsResourceAdapter@6c8ed9a9 destination=java:global/jms/TestQueue destinationType=javax.jms.Queue acknowledgeMode=Auto-acknowledge subscriptionDurability=false reconnectInterval=10 reconnectAttempts=-1 user=null maxMessages=1 minSession=1 maxSession=15 connectionFactory=java:global/jms/ConnectionFactory): java.lang.UnsupportedOperationException
        at com
.rabbitmq.jms.client.RMQSession.setMessageListener(RMQSession.java:556)
        at org
.jboss.resource.adapter.jms.inflow.JmsServerSession.setup(JmsServerSession.java:118)

Or this one, when I implement the setMessageListener method:

2017-05-24 18:02:56,298 ERROR [org.jboss.resource.adapter.jms.inflow.JmsActivation] (default-threads - 1) Unable to reconnect org.jboss.resource.adapter.jms.inflow.JmsActivationSpec@27384459(ra=org.jboss.resource.adapter.jms.JmsResourceAdapter@9b6044bb destination=java:global/jms/TestQueue destinationType=javax.jms.Queue acknowledgeMode=Auto-acknowledge subscriptionDurability=false reconnectInterval=10 reconnectAttempts=-1 user=null maxMessages=1 minSession=1 maxSession=15 connectionFactory=java:global/jms/ConnectionFactory): java.lang.UnsupportedOperationException
        at com
.rabbitmq.jms.client.RMQConnection.createConnectionConsumer(RMQConnection.java:392)
        at org
.jboss.resource.adapter.jms.inflow.JmsServerSessionPool.setupConsumer(JmsServerSessionPool.java:252)

This is because both RMQSession.setMessageListener and RMQConnection.createConnectionConsumer methods are not yet implemented.

My questions is the following. Are there any project to implement such missing features in RabbitMQ JMS Client? If answer is no, would you accept a pull request to complete the missing part, allowing Message Driven Beans usage to consume Rabbit queues?

Thanks,
Rémi

Michael Klishin

unread,
May 30, 2017, 6:46:52 AM5/30/17
to rabbitm...@googlegroups.com, mus...@gmail.com
Rémi's pull request will be in the next (should be 1.7.0) release of the JMS client.

--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-users+unsubscribe@googlegroups.com.
To post to this group, send email to rabbitmq-users@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
MK

Staff Software Engineer, Pivotal/RabbitMQ

Arnaud Cogoluègnes

unread,
May 30, 2017, 8:38:47 AM5/30/17
to rabbitm...@googlegroups.com
There's no plan to implement those features, as there hasn't been demand about them, but yes, a PR would be welcome!

--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-users+unsubscribe@googlegroups.com.
To post to this group, send email to rabbitmq-users@googlegroups.com.

Rémi Bantos

unread,
Sep 22, 2017, 3:28:59 PM9/22/17
to rabbitmq-users
It seems like there are demand now about JEE MDB integration. I've read many questions in this user group and across the web about "How to integrate MDB and RabbitMQ".
A JCA resource adapter or the implementation of optional features in RabbitMQ JMS Client would allow to use Message Driven Beans to connect to RabbitMQ.
What is the process to request such features?
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
To post to this group, send email to rabbitm...@googlegroups.com.

Arnaud Cogoluègnes

unread,
Sep 25, 2017, 4:10:28 AM9/25/17
to rabbitm...@googlegroups.com
You can fill in an issue [1]. Don't hesitate to provide links and design proposals on how to add this feature to the project. Then a PR with no breaking changes and solid testing would be welcome.



To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-users+unsubscribe@googlegroups.com.
To post to this group, send email to rabbitmq-users@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages