How do I setup RabbitMQ with JMS and AMQP 1.0? - spring-boot

I need to send messages to RabbitMQ through AMQP 1.0 and receive them with #JmsListener in Spring Boot. I've discovered there are two specific plugins for RabbitMQ that add support for AMQP 1.0 and JMS.
The JMS plugin is meant to be used with RabbitMQ's JMS Client library but on the AMQP 1.0 github they say that SwiftMQ Java Client is the one that works properly.
What I don't understand is, what do I need to use to fulfill the above requirements? How do I set it up?

You could just use the Qpid JMS client library. It implements JMS so it will integrate with Spring JMS and it speaks AMQP 1.0 over the wire so it will work with RabbitMQ + AMQP 1.0 plugin.

Related

emq and Spring AMQP

I am new to both Spring AMQP and MQTT world. I have a legacy application which uses Rabbitmq as broker for mqtt messages.There are plans to use emqtt as broker and I want to know if my existing listeners ( on mqtt topics) written using Spring AMQP can work with emqtt or not ? I am just trying to save the effort of rewriting all those listeners using MqttClient.
Thanks in advance.

Common java AMQP interface

Hi is there any java shared common amqp interface that is shared among all the amqp implementors?
Something similar to JMS, in a way to avoid vendor locking for amqp message broker implementor.
AMQP is a standardised Messaging protocol and JMS is an API. You can use a AMQP client library that implements the JMS API if you want but it is not necessary. All AMQP libraries should able to talk with an AMQP broker, if their AMQP version is compatible.
So the answer is: yes, you can use JMS.

Is there a JMS API/Client that works with all AMQP brokers?

The JMS is the vendor neutral API to messaging in the Java space. AMQP's mission is "to become the standard protocol for interoperability between all messaging middleware". I'm looking for a JMS client implementation that is interoperable between AMQP vendors. Specifically, it would be nice if it could talk to either RabbitMQ or Qpid.
The Qpid JMS client (which is, for the avoidance of effort, the same code as the OpenAMQ JMS client) encodes JMS in AMQP 0-9-1. I cannot speak for the quality of the client, but that should work for both Qpid Java edition and RabbitMQ.
It won't be an entirely lossless encoding, however -- there are some bits of API in JMS that don't carry across to AMQP. Qpid may have shims in place for those; RabbitMQ, by and large, doesn't. I am thinking specifically of 'nolocal' and selectors. There are probably others.
(Actually it /kind of/ does selectors using AMQP header exchanges, but the results may not be what you expect from JMS)
There is an effort to create a JMS client that uses AMQP 1.0. But there are no Qpid nor RabbitMQ releases that support AMQP 1.0, which is after all really an entirely different protocol to 0-9-1 and other prior versions.
I have used Apache Qpid client library (qpid-client-0.32-bin.tar.gz) with RabbitMQ (AMQP 0-9-1) recently and It worked very well.
If you want to connect to AMQP 1.0 Broker you should use this Qpid lib (apache-qpid-jms-0.1.0-bin.tar.gz)
Both libs can be downloaded from here:
http://qpid.apache.org/download.html
Qpid itself has a JMS client. I've never used it, but it is listed here under AMQP Client APIs
http://qpid.apache.org/

Using existing JMS libraries with a AMQP broker (RabbitMQ)

We use RabbitMQ and Spring-AMQP for our messaging system.
However there are many Java libraries that use JMS that I would rather not rewrite to AMQP.
I failed to Google a JMS client that will use AMQP.
Should I just rewrite the library to use AMQP directly?
qpid , which also speaks amqp , has a JMS client library. Perhaps that also works with rabbitmq.
There's some (old) indications the OpenAMQ library works works with rabbitmq
Depending on what you're actually building, you'll probably find that Spring Integration is useful:
http://www.springsource.org/spring-integration
It abstracts the concepts of end points, such that they are pluggable and there is built-in support for JMS & AMQP.
It's fairly trivial to build a simple AMQP <-> JMS adapter.

How will Heroku's AMQP work?

I saw that they soon will have an addon for AMQP.
I'm about to learn how to use AMQP with RabbitMQ. I suppose that that addon doesn't deal with RabbitMQ.
Isn't AMQP just a protocol. Are they using any AMQP broker like RabbitMQ or ActiveMQ?
Heroku founder has written a Ruby library named Minion https://github.com/orionz/minion that mentions RabbitMQ so I suspect that will be the one.
As long as they are using AMQP .8 and .9 then they will have to supply a broker. Only AMQP 1.0 can be used brokerless.

Resources