Rabbit MQ Java API or Spring AMQP templates?

449 views
Skip to first unread message

arun arun

unread,
Jan 26, 2015, 6:13:15 PM1/26/15
to rabbitm...@googlegroups.com
We decided to use Rabbit MQ for Asynchronous order processing over web. Our application stack - Java, Spring, Tomcat, MS SQL. 

Wondering if any of you have any suggestions on using RabbitMQ Java API vs Spring AMQP ?

Since our web application is built on Spring framework, I would think it would be better off using Spring AMQP, but I don't really see much documentation around it. Any of you have any experiences or suggestions to share? 

Thanks!

Gary Russell

unread,
Jan 26, 2015, 6:33:19 PM1/26/15
to arun arun, rabbitm...@googlegroups.com
I am not sure what you mean by "don't really see much documentation around it." for Spring AMQP.

See the project page [1] and reference manual [2]. The project brings the familiar Spring programming model to RabbitMQ including a RabbitTemplate and message listener container (very similar to Spring JMS).

As with most Spring abstractions, it provides a higher level API, takes care of resource management, removes the need for boilerplate code, while allowing you to drop down to the native APIs if necessary.

You can, of course, use the APIs directly but it is common for existing Spring users to use the Spring AMQP APIs.



--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
To post to this group, send email to rabbitm...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Michael Klishin

unread,
Jan 26, 2015, 6:34:19 PM1/26/15
to arun arun, rabbitm...@googlegroups.com
Spring AMQP implements several patterns on top of the Java client and provides a way to configure things "the Spring way". So see if you find those patterns suitable for you. Spring AMQP has a doc guide on spring.io.

MK

arun arun

unread,
Jan 28, 2015, 3:10:46 PM1/28/15
to rabbitm...@googlegroups.com, arun....@gmail.com
Thanks Gary for your reply!

Since, ActiveMQ supports AMQP, Spring AMQP could be used to work with ActiveMQ too right?

I'm looking at the quick start code snippet here- http://projects.spring.io/spring-amqp/ and I see there is a RabbitTemplate that is used to send messages. How does this work in case of ActiveMQ? Use RabbitTemplate or other class?

Thanks!

Gary Russell

unread,
Jan 28, 2015, 3:55:03 PM1/28/15
to arun arun, rabbitm...@googlegroups.com
No; spring-amqp is a general abstraction; spring-rabbit is the (only) implementation. We don't have an ActiveMQ implementation.

Sayed Zaman

unread,
May 26, 2020, 11:15:17 PM5/26/20
to rabbitmq-users
I am experiencing the same problem in 2020 ! Dont really see enough resources for spring. Google is full of spring boot.

Arnaud Cogoluègnes

unread,
May 27, 2020, 3:03:48 AM5/27/20
to rabbitmq-users
If you're already using Spring, I'd recommend Spring AMQP instead of the bare RabbitMQ Java client. There's nothing wrong with the Java client, but you'll find all the Spring patterns you must be familiar with with Spring AMQP (infrastructure configuration, annotation-based and POJO programming model, etc).

There are plenty of resources on Spring AMQP, start with the web page [1] and the reference manual [2].

[1] https://spring.io/projects/spring-amqp
[2] https://docs.spring.io/spring-amqp/docs/2.2.7.RELEASE/reference/html/

________________________________________
From: rabbitm...@googlegroups.com <rabbitm...@googlegroups.com> on behalf of Sayed Zaman <sayed...@oscillosoft.com.au>
Sent: Wednesday, May 27, 2020 5:15 AM
To: rabbitmq-users
Subject: [rabbitmq-users] Re: Rabbit MQ Java API or Spring AMQP templates?
--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com<mailto:rabbitmq-user...@googlegroups.com>.
To view this discussion on the web, visit https://groups.google.com/d/msgid/rabbitmq-users/444d4766-bb5d-4ef9-bc5e-4bec40284610%40googlegroups.com<https://urldefense.proofpoint.com/v2/url?u=https-3A__groups.google.com_d_msgid_rabbitmq-2Dusers_444d4766-2Dbb5d-2D4ef9-2Dbc5e-2D4bec40284610-2540googlegroups.com-3Futm-5Fmedium-3Demail-26utm-5Fsource-3Dfooter&d=DwMFaQ&c=lnl9vOaLMzsy2niBC8-h_K-7QJuNJEsFrzdndhuJ3Sw&r=83cZqkWahGRyjLmvADxkfYk1y5CchvcrmMXVqj2r7i8&m=_U6cHgZl7VmYx-A-m_2naXFR3TWTkL_elQ7Gj5SQ0jQ&s=zY78E0-ul5nuo_NRUAc9Fw0t8NDfnc_e_jPSR_YnSmo&e=>.
Reply all
Reply to author
Forward
0 new messages