Search code examples
javajmsrabbitmqactivemq-classicamqp

JMS Connect to a Queue without any specific library


I want to create a class that sends a message to a messaging queue using AMQP protocol such as ActiveMQ or RabbitMQ, but without including any specific jar/file/library to those MQ providers.

Every example I see on the web uses one of the above technologies. I thought I was able to connect to a queue strictly using JMS? How can I de-couple my messaging technology with my Producer/Consumer classes so that I could switch out ActiveMQ with RabbitMQ without recompiling the code? Is this even possible?

/frustrated @ 7:00 PM :(

Thanks!


Solution

  • Take a look at this: Implementing vendor-independent JMS solutions. Disclosure: I wrote it, a while ago, but I think you will find it addresses your question from the JMS perspective.

    Update: As IBM's removed the page, here's a saved snapshot from archive.org Implementing vendor-independent JMS solutions