Enterprise Integration Zone is brought to you in partnership with:

Mitch Pronschinske is the Lead Research Analyst at DZone. Researching and compiling content for DZone's research guides is his primary job. He likes to make his own ringtones, watches cartoons/anime, enjoys card and board games, and plays the accordion. Mitch is a DZone Zone Leader and has posted 2577 posts at DZone. You can read more from them at their website. View Full User Profile

Spring AMQP - Simplifying Messaging App Development

07.19.2010
| 16697 views |
  • submit to reddit
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.