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 pageThus, 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