[rabbitmq-discuss] integration with jboss 5.1 as

Greg Nieman gnieman at gopivotal.com
Tue Oct 8 15:53:50 BST 2013


I've been thinking about this for a bit, and I'm not entirely sure I understand what you are getting at.  I could be way off here, but at least to my understanding the JMS client is an intermediary layer that exists at the producer and consumer level and allows an application to interact with RabbitMQ in the same fashion it would with a JMS messaging server.  So to my thinking you would use this if you wanted to switch from an existing JMS server to RabbitMQ using AMQP without completely rewriting the code that already existed.  Since the overall approach is much different.

But in this case you haven't really changed the mechanism of the message queue at all.  It's still RabbitMQ based, sending and receiving messages via AMQP.  It's just that to the the producer and consumer code it kind of looks like JMS now.  You publish a message using an API that looks like JMS, but it still goes out across the wire as AMQP.  And when you consume it, same thing.

Which is why the discussion of MDB's here confuses me.  Since it appears as though you want to consume what you publish to a RabbitMQ server via an MDB deployed in JBoss.  Being more of a Spring, Message Driven Pojo oriented than a JEE/JMS/MDB person I'm stretching a bit here.  But it seems to me that if this is what you are looking to do it's not going to just work out of the box with the JMS client.

OK, so you have a bunch of messages in RabbitMQ.  How are they going to get consumed by JBoss?  The container wants a JMS message so it can call it's MDB's.  But in the classic case what it's getting those messages from is a JMS queue in that same container.  Or alternatively, I'm pretty sure it's possible to create a Resource Adapter that consumes from a non-installed message broker.  I know, for instance you can consume from ActiveMQ and route the messages to Glassfish MDB's.  But you have to write a Resource Adapter first.  I would expect something similar for JBoss.  In which you'd create an adapter using the RabbitMQ JMS client that would consumer the messages from the RabbitMQ server and get them into to a usable format for your MDB's.

But I don't know.  That seems like an awful lot of work.  Even more than you'd be saving by reusing some existing JMS codebase.  Seems like it would be easier to just use Spring AMQP to consume from the Rabbit queue and rework the MDB code base so they consume as pojos perhaps.  Again, not exactly sure what you are trying to do.

On oct 3, 2013, at 11:25 p.m., "PATAR, SAGAR"<sp345s at att.com>  wrote:
Just wanted to make sure that we should be able to subscribe the messages through MDB?s deployed in jboss5.1 as ?



More information about the rabbitmq-discuss mailing list