SPRINGAMQP or RabbitMq Java API

Question!

I am new to rabbitMq and Spring AMQP . I am building a new project from scratch . Here for one of the components we are using rabbit-Mq as message broker .

In this project ,primarily all the development has been happening in Java . We are using Spring in general for some of the components .

Now , rabbit-mq though written in Erlang does provide a clean java Api. There is also spring amqp which provides a nice interface to support loose coupling (through AMQPTemplate etc.) .

One advantage which I thought of using SpringAMQP is that because of above mentioned loose coupling , tomorrow if we have to use any other implementation of AMQP than rabbit-Mq(spring-rabbit ) I don't have to change my code . But as I see ,today the implementation is for rabbit-Mq and barring extraordinary circumstances , I don't see anything happening here. We should be using rabbit-Mq for near foreseeable future and also not sure if there is any other message broker implementation thought at spring amqp side other than rabbitMq.

The disadvantage I think is that I am well away off understanding the actual client API RabbitMq provides due to the abstraction Spring AMQP gives(unless I decide to dig really deep) .

In such a case , is there any other advantage SPRING AMQP provides over traditional rabbitMq Java API ?

Thanks



Answers
this isn't a question that can be answered by someone else. you and your team have to decide what is best for your team.

if your team is already using spring and is comfortable with it, use the spring amqp provider.

if you don't want to be tied to spring anymore than you are, using the rabbitmq library directly.

pick one and stick with it. you'll become productive with it and it won't matter that you didn't choose the other one.



Spring AMQP sits "on top of" the RabbitMQ amqp-client java library, and brings the familiar Spring programming model to RabbitMQ.

It provides similar features to those that Spring JMS users are used to, including message-driven POJOs and the RabbitTemplate.

As with all Spring *Templates, the RabbitTemplate eliminates boilerplate code, cleans up resources automatically, participates in existing rabbitmq transactions, etc., while still allowing you to drop down to the native API if you have advanced needs that are not satisfied by the higher-level API (which is somewhat rare). So, using one does not preclude the other.

Disclosure: I am the project lead.



This video can help you solving your question :)
By: admin