Spring 5.0 By Example
上QQ阅读APP看书,第一时间看更新

Spring AMQP

This subproject supports the AMQP protocol in Spring Framework. It provides a template to interact with the message broker. A template is like a super high-level API that supports the send and receive operations. 

There are two projects in this set: spring-amqp, which can be used for ActiveMQ for instance, and spring-rabbit, which adds support for the RabbitMQ broker. This project enables broker administration through the APIs to declare queues, bindings, and exchanges.

These projects encourage the extensive use of dependency injection provided by the core container, because they make the configuration more declarative and easy to understand.

Nowadays, the RabbitMQ broker is the popular choice for the messaging applications, and Spring provides full support for client interactions up to the level of administration tasks.

Some common annotations are  @Exchange and  @QeueueBinding.