4. Spring Integration - Reference

This part of the reference documentation provides a quick introduction to the AMQP support within the Spring Integration project.

4.1 Spring Integration AMQP Support

4.1.1 Introduction

The Spring Integration project includes AMQP Channel Adapters and Gateways that build upon the Spring AMQP project. Those adapters are developed and released in the Spring Integration project. In Spring Integration, "Channel Adapters" are unidirectional (one-way) whereas "Gateways" are bidirectional (request-reply). We provide an inbound-channel-adapter, outbound-channel-adapter, inbound-gateway, and outbound-gateway.

Since the AMQP adapters are part of the Spring Integration release, the documentation will be available as part of the Spring Integration distribution. As a taster, we just provide a quick overview of the main features here.

4.1.2 Inbound Channel Adapter

To receive AMQP Messages from a Queue, configure an <inbound-channel-adapter>

<amqp:inbound-channel-adapter channel="fromAMQP"
                              queue-names="some.queue"
                              connection-factory="rabbitConnectionFactory"/>

4.1.3 Outbound Channel Adapter

To send AMQP Messages to an Exchange, configure an <outbound-channel-adapter>. A routing-key may optionally be provided in addition to the exchange name.

<amqp:outbound-channel-adapter channel="toAMQP"
                               exchange-name="some.exchange"
                               routing-key="foo"
                               amqp-template="rabbitTemplate"/>

4.1.4 Inbound Gateway

To receive an AMQP Message from a Queue, and respond to its reply-to address, configure an <inbound-gateway>.

<amqp:inbound-gateway request-channel="fromAMQP"
                      reply-channel="toAMQP"
                      queue-names="some.queue"
                      connection-factory="rabbitConnectionFactory"/>

4.1.5 Outbound Gateway

To send AMQP Messages to an Exchange and receive back a response from a remote client, configure an <outbound-gateway>. A routing-key may optionally be provided in addition to the exchange name.

<amqp:outbound-gateway request-channel="toAMQP"
                       reply-channel="fromAMQP"
                       exchange-name="some.exchange"
                       routing-key="foo"
                       amqp-template="rabbitTemplate"/>
Updated at: 9 months ago
LongRunningIntegrationTestTable of content5. Other Resources