Spring AMQP - Simplifying Messaging App Development

DZone 's Guide to

Spring AMQP - Simplifying Messaging App Development

· Java Zone ·
Free Resource
SpringSource released its first milestone for Spring AMQP 1.0 over the weekend.  If you are familiar with Spring JMS support, Spring AMQP 1.0 should be easy to pick up, and the migration difficulties are almost non-existent.  Spring AMQP facilitates portable Java and .NET APIs across RabbitMQ (now owned by Spring) and Apache Qpid.  The project also offers abstractions that promote a POJO-based programming model.  

Spring AMQP's primary goal is the simplification of messaging application development.  Specifically, it helps developers build applications based on the AMQP (Advanced Message Queuing Protocol).  Spring AMQP provides publishing, multithreaded consumer generation, and message converters.   Spring AMQP's libraries facilitate the management of AMQP resources while promoting DI and declarative configuration.

AMPQ Model

The project consists of several modules such as spring-amqp, spring-rabbit, and spring-erlang.  The spring-amqp module houses the org.springframework.amqp.core package, which contains the classes that represent the core AMQP model.  In the documentation, it says: "Our intention is to provide generic abstractions that do not rely on any particular AMQP broker implementation or client library. End user code will be more portable across vendor implementations as it can be developed against the abstraction layer only. These abstractions are then used implemented by broker-specific modules, such as 'spring-rabbit'."

You can read more about Spring AMQP 1.0 M1 from the documentation here.  The AMQP specification is actually very readable.  The Spring AMQP code can be easily understood by anyone familiar with the spec.  Documentation on the Inbound and Outbound Gateways are coming soon.  

Spring AMQP supports AMQP 0.8, but it is recommended that you read the 0.9.1 document.  The current version of SpringAMQP has built-in support for version 1.8.x of RabbitMQ.

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}