spring-projects / spring-amqp

Spring AMQP - support for Spring programming model with AMQP, especially but not limited to RabbitMQ
https://spring.io/projects/spring-amqp
Apache License 2.0
802 stars 620 forks source link

Support for Apache Qpid Proton AMQP 1.0 (spring-proton?) similar to spring-kafka and spring-amqp [AMQP-662] #2217

Closed spring-operator closed 1 year ago

spring-operator commented 8 years ago

Bartolom opened AMQP-662 and commented

Spring Integration has long time support for the rich features of AMQP 0.9.1 with RabbitMQ in spring-amqp . AMQP 0.9.1 is very different to AMQP 1.0 and a lot of people enjoy the richness. AMQP 1.0 is a trimmed down specification but allows for the basics like simple queueing and pubsub/topics. For many use case where the middleware broker should only do simple things this seems enough from an application dveloper point of view. I have to admit I don't understand the technical implication in the break between AMQP 0.9.x and AMQP 1.0 well.

The Spring Integration team recently also announced a milestone of spring-kafka https://spring.io/blog/2016/03/14/spring-for-apache-kafka-milestone-1-available So there seems to be a pattern how to introduce more broker-driver into the Spring ecosystem.

In our use case we are trying to move away from a legacy HornetQ-Core broker and driver to something more up to date. We want to switch to the successor project Apache Artemis and noticed it has AMQP 1.0 support through the library "Apache Qpid Proton". http://qpid.apache.org/proton/index.html For us it would be desireable to get rid of the HornetQ-Core driver and switch to a neutral Apache-Qpid-Proton driver so we could replace the broker E.g. Artemis vs. ActiveMQ vs. RabbitMQ, vs. someSuperLightweigtInMemoryMockForTesting.

Apache Qpid Proton seems to be a consensus open source implementation of AMQP 1.0 with three implementation Java/C++/JavaScript and a lot of third part langugae bindings (Go, Ruby, Phyton, ...).

AMQP 1.0 seemed to be controversial four to five years ago: http://stackoverflow.com/questions/11928655/where-are-the-amqp-1-0-implementations-would-it-make-sense-to-wait but the Apache Qpid Proton library seem to be steadily improving so hopefully the technical problems are now long gone. The library is used in Apache Artemis and Apache ActiveMQ.

Also RabbitMQ seems to have basic AMQP 1.0 support https://github.com/rabbitmq/rabbitmq-amqp1.0 In RabbitMQ it seems to have less focus, and the Apache Qpid Proton version that they tried were early prototypes (0.2 and 0.4)

QPid / Proton Java client [2] We have not been able to get this client to get as far as opening a network connection (tested against 0.2 and 0.4)

Apache Qpid is currently at 0.12 https://issues.apache.org/jira/browse/PROTON/?selectedTab=com.atlassian.jira.jira-projects-plugin:changelog-panel

We also found this Spring-Boot related comparision https://github.com/tanvir-ahmed-m4/demo-spring-boot-mq it's form January 2015 and the devloper that conducted it did a nice initial matrix: https://github.com/tanvir-ahmed-m4/demo-spring-boot-mq/blob/master/interoperability.xlsx In this template the word "Qpid" reffers to the "Qpid-Broker" http://qpid.apache.org/components/java-broker/index.html He had the qpid-proton-library on his todo but did not try it yet.

Some other historic comparisions we found (most of them a few years old): https://www.predic8.com/activemq-hornetq-rabbitmq-apollo-qpid-comparison.htm


2 votes, 3 watchers

spring-operator commented 7 years ago

Gary Russell commented

I just took a quick look at this and have a very early prototype here - I am not sure how much we can get into the next (2.0) release so any suggestions for priorities will help.

Of course, contributions are always welcome.

spring-operator commented 7 years ago

Bartolom commented

It looks like there will be some major changes in proton 0.16 onwards. They want to remove the simple "Messanger" and concentrate a bit more on event-loop (reactive?).

http://qpid.2158936.n2.nabble.com/Proton-s-road-ahead-td7652663.html

Their proton-c seems to have an event-loop thingy build in already (also named "reactor") but they want to change some things in proton-j. I had a look on the Messanger class as well and its tempting because it seems so simple. But if one wants to do the fine tuning one is used to from spring-jms (ConnectionFactory) and (I assume as we don't use it actively right now) from spring-amqp, one most likely need to program against their main lower level APIs.

One theoretical alternative path might be to have a stack like:

So JMS is the application API und AMQP 1.0 the backing protocol. Thats essentially the goal of the qpid-jms project, and Spring would adapt its existing jms infrastructure on top of this.

As spring-projects are pushing their "reactive" theme right now, this might fit here as well when the qpid team is also moving into this direction.

But then this ticket might might belong somewhere else?

spring-operator commented 7 years ago

Gary Russell commented

I just tested spring-jms on top of qpid-jms 0.21.0, talking to the QPID Broker for Java 6.1.2 with no problems.

spring-operator commented 7 years ago

Gary Russell commented

I am considering closing this with the recommendation of using spring-jms over qpid-jms to talk to AMQP 1.0 brokers.

Feedback, as always, is welcome.