INT-2394 Support HA (Mirrored) Queues

Changes to Connection Factory interface (stub).

INT-2394 Polishing

INT-2394 Map Gateway Correlation Header

Map spring_reply_correlation if present.

INT-2394 Map ReplyTo Stack

Enable the use outbound-gateway in a destination application
to which we sent a message using another outbound gateway.

The RabbitTemplate now pushed exising correlation data onto
a stacked header attribute.

INT-2509 Publisher Confirms and Returns

Add Publisher Confirm support to the outbound channel
adapter.

Add returns support to outbound channel adapter and gateway.

INT-2509 Polishing

PR Review comments.

Docs.

Fix chain test after rebase.
This commit is contained in:
Gary Russell
2012-01-09 16:10:30 -05:00
committed by Oleg Zhurakousky
parent 8fbc9264f7
commit 11e5fe0c0c
16 changed files with 667 additions and 248 deletions

View File

@@ -280,7 +280,11 @@ this list can also be simple patterns to be matched against the header names (e.
exchange-name=""]]><co id="amqp-outbound-channel-adapter-xml-4-co" linkends="amqp-outbound-channel-adapter-xml-4" /><![CDATA[
order="1"]]><co id="amqp-outbound-channel-adapter-xml-5-co" linkends="amqp-outbound-channel-adapter-xml-5" /><![CDATA[
routing-key=""]]><co id="amqp-outbound-channel-adapter-xml-6-co" linkends="amqp-outbound-channel-adapter-xml-6" /><![CDATA[
routing-key-expression=""]]><co id="amqp-outbound-channel-adapter-xml-7-co" linkends="amqp-outbound-channel-adapter-xml-7" /><![CDATA[/>]]>
routing-key-expression=""]]><co id="amqp-outbound-channel-adapter-xml-7-co" linkends="amqp-outbound-channel-adapter-xml-7" /><![CDATA[
confirm-correlation-expression=""]]><co id="amqp-outbound-channel-adapter-xml-8-co" linkends="amqp-outbound-channel-adapter-xml-8" /><![CDATA[
confirm-ack-channel=""]]><co id="amqp-outbound-channel-adapter-xml-9-co" linkends="amqp-outbound-channel-adapter-xml-9" /><![CDATA[
confirm-nack-channel=""]]><co id="amqp-outbound-channel-adapter-xml-10-co" linkends="amqp-outbound-channel-adapter-xml-10" /><![CDATA[
return-channel=""]]><co id="amqp-outbound-channel-adapter-xml-11-co" linkends="amqp-outbound-channel-adapter-xml-11" /><![CDATA[/>]]>
</programlisting>
<para>
<calloutlist>
@@ -321,6 +325,33 @@ this list can also be simple patterns to be matched against the header names (e.
'payload.key'). By default, this will be an empty String.
<emphasis>Optional</emphasis>.</para>
</callout>
<callout arearefs="amqp-outbound-channel-adapter-xml-8-co" id="amqp-outbound-channel-adapter-xml-8">
<para>An expression defining correlation data. When provided, this configures the underlying
amqp template to receive publisher confirms. Requires a RabbitTemplate and a
CachingConnectionFactory with publisherConfirms enabled. When a publisher confirm
is received, it is written to either the confirm-ack-channel, or the confirm-nack-channel,
depending on the confirmation type. The payload of the confirm is the correlation data as
defined by this expression and the message will have a header 'amqp_publishConfirm' set to
true (ack) or false (nack). Examples: "headers['myCorrelationData']", "payload".
<emphasis>Optional</emphasis>.</para>
</callout>
<callout arearefs="amqp-outbound-channel-adapter-xml-9-co" id="amqp-outbound-channel-adapter-xml-9">
<para>The channel to which positive (ack) publisher confirms are sent; payload is
the correlation data defined by the <emphasis>confirm-correlation-expression</emphasis>.
<emphasis>Optional, default=nullChannel</emphasis>.</para>
</callout>
<callout arearefs="amqp-outbound-channel-adapter-xml-10-co" id="amqp-outbound-channel-adapter-xml-10">
<para>The channel to which negative (nack) publisher confirms are sent; payload is
the correlation data defined by the <emphasis>confirm-correlation-expression</emphasis>.
<emphasis>Optional, default=nullChannel</emphasis>.</para>
</callout>
<callout arearefs="amqp-outbound-channel-adapter-xml-11-co" id="amqp-outbound-channel-adapter-xml-11">
<para>The channel to which returned messages are sent. When provided, the underlying amqp template
is configured to return undeliverable messages. The message will be constructed from the
data received from amqp, with the following additional headers: <emphasis>amqp_returnReplyCode,
amqp_returnReplyText, amqp_returnExchange, amqp_returnRoutingKey</emphasis>.
<emphasis>Optional</emphasis>.</para>
</callout>
</calloutlist>
</para>
</section>
@@ -387,8 +418,9 @@ this list can also be simple patterns to be matched against the header names (e.
exchange-name=""]]><co id="amqp-outbound-gateway-adapter-xml-4-co" linkends="amqp-outbound-gateway-adapter-xml-4" /><![CDATA[
order="1"]]><co id="amqp-outbound-gateway-adapter-xml-5-co" linkends="amqp-outbound-gateway-adapter-xml-5" /><![CDATA[
reply-channel=""]]><co id="amqp-outbound-gateway-adapter-xml-6-co" linkends="amqp-outbound-gateway-adapter-xml-6" /><![CDATA[
routing-key=""]]><co id="amqp-outbound-gateway-adapter-xml-7-co" linkends="amqp-outbound-gateway-adapter-xml-7" /><![CDATA[
routing-key-expression=""]]><co id="amqp-outbound-gateway-adapter-xml-8-co" linkends="amqp-outbound-gateway-adapter-xml-8" /><![CDATA[/>]]>
routing-key=""]]><co id="amqp-outbound-gateway-adapter-xml-7-co" linkends="amqp-outbound-gateway-adapter-xml-7" /><![CDATA[
routing-key-expression=""]]><co id="amqp-outbound-gateway-adapter-xml-8-co" linkends="amqp-outbound-gateway-adapter-xml-8" /><![CDATA[
return-channel=""]]><co id="amqp-outbound-gateway-adapter-xml-9-co" linkends="amqp-outbound-gateway-adapter-xml-9" /><![CDATA[/>]]>
</programlisting>
<para>
<calloutlist>
@@ -434,8 +466,25 @@ this list can also be simple patterns to be matched against the header names (e.
By default, this will be an empty String.
<emphasis>Optional</emphasis>.</para>
</callout>
</calloutlist>
</para>
<callout arearefs="amqp-outbound-gateway-adapter-xml-9-co" id="amqp-outbound-gateway-adapter-xml-9">
<para>The channel to which returned messages are sent. When provided, the underlying amqp template
is configured to return undeliverable messages. The message will be constructed from the
data received from amqp, with the following additional headers: <emphasis>amqp_returnReplyCode,
amqp_returnReplyText, amqp_returnExchange, amqp_returnRoutingKey</emphasis>.
<emphasis>Optional</emphasis>.</para>
</callout>
</calloutlist>
</para>
<note>
<para>Prior to Spring Integration 2.2, and Spring AMQP 1.1, the outbound gateway used a new, temporary,
reply queue for each request. This is still the default, but now the RabbitTemplate can be configured
with a specific queue for replies; headers are added to the outbound message for request/reply correlation.
It is important that the consuming application returns these headers unchanged. The headers are
<classname>spring_reply_correlation</classname> and <classname>spring_reply_to</classname>. If
the consuming application is a Spring Integration application, these headers will be managed
automatically, including the case where that application might send a request/reply to a third
application using an outbound gateway.</para>
</note>
</section>

View File

@@ -18,6 +18,20 @@
Spring Integration now uses Spring 3.1.
</para>
</section>
<section id="2.2-amqp-11">
<title>Spring-AMQP 1.1</title>
<para>
Spring Integration now uses Spring AMQP 1.1. This enables several features
to be used within a Spring Integration application, including...
</para>
<itemizedlist>
<listitem>A fixed reply queue for the outbound gateway</listitem>
<listitem>HA (mirrored) queues</listitem>
<listitem>Publisher Confirms</listitem>
<listitem>Returned Messages</listitem>
<listitem>Support for Dead Letter Exchanges/Dead Letter Queues</listitem>
</itemizedlist>
</section>
</section>
<section id="2.2-new-components">