diff --git a/docs/src/reference/docbook/amqp.xml b/docs/src/reference/docbook/amqp.xml
index b163c4de31..653309761b 100644
--- a/docs/src/reference/docbook/amqp.xml
+++ b/docs/src/reference/docbook/amqp.xml
@@ -63,18 +63,20 @@
error-channel=""]]>]]>
+ mapped-request-headers=""]]>]]>
@@ -131,10 +133,28 @@
Optional (Defaults to true).
- HeaderMapper to use when receiving AMQP Messages.
- Optional.
-
+ HeaderMapper to use when receiving AMQP Messages.
+ Optional.
+ By default only standard AMQP properties (e.g. contentType) will be copied to and from
+ Spring Integration MessageHeaders. Any user-defined headers within the AMQP
+ MessageProperties will NOT be copied to or from an AMQP Message unless
+ explicitly identified via 'requestHeaderNames' and/or 'replyHeaderNames' properties of this HeaderMapper.
+ If you need to copy all user-defined headers simply use wild-card character '*'.
+
+
+ Comma-separated list of names of AMQP Headers to be mapped from the AMQP request into the MessageHeaders.
+This can only be provided if the 'header-mapper' reference is not being set directly. The values in
+this list can also be simple patterns to be matched against the header names (e.g. "*" or "foo*, bar" or "*foo").
+
+
+ Comma-separated list of names of MessageHeaders to be mapped into the AMQP Message Properties of the AMQP reply message.
+ All standard Headers (e.g., contentType) will be mapped to AMQP Message Properties while user-defined headers will be mapped to 'headers' property
+ which itself is a Map.
+ This can only be provided if the 'header-mapper' reference is not being set directly. The values in
+ this list can also be simple patterns to be matched against the header names (e.g. "*" or "foo*, bar" or "*foo").
+
+
Reference to the SimpleMessageListenerContainer
to use for receiving AMQP Messages. If this attribute is provided,
then no other attribute related to the listener container
@@ -147,15 +167,15 @@
own MessageListener configured.
Optional.
-
+
The MessageConverter to use when receiving AMQP Messages.
Optional.
-
+
The MessagePropertiesConverter to use when receiving AMQP Messages.
Optional.
-
+
Specify the phase in which the underlying SimpleMessageListenerContainer
should be started and stopped. The startup order proceeds
from lowest to highest, and the shutdown order is the
@@ -164,24 +184,24 @@
stops as soon as possible.
Optional.
-
+
Tells the AMQP broker how many messages to send to each
consumer in a single request. Often this can be set quite
high to improve throughput. It should be greater than or
equal to the transaction size (see attribute "tx-size").
Optional (Defaults to 1).
-
+
Receive timeout in milliseconds.
Optional (Defaults to 1000).
-
+
Specifies the interval between recovery attempts of the underlying
SimpleMessageListenerContainer (in
milliseconds).
Optional (Defaults to 5000).
-
+
The time to wait for workers in milliseconds after the
underlying SimpleMessageListenerContainer
is stopped, and before the AMQP connection is forced closed.
@@ -192,7 +212,7 @@
transactional). Defaults to 5000 milliseconds.
Optional (Defaults to 5000).
-
+
By default, the underlying SimpleMessageListenerContainer
uses a SimpleAsyncTaskExecutor implementation, that fires
up a new Thread for each task, executing it asynchronously.
@@ -202,14 +222,14 @@
a thread-pooling TaskExecutor implementation as an alternative.
Optional (Defaults to SimpleAsyncTaskExecutor).
-
+
By default the underlying SimpleMessageListenerContainer
creates a new instance of the DefaultTransactionAttribute (takes
the EJB approach to rolling back on runtime, but not checked
exceptions.
Optional (Defaults to DefaultTransactionAttribute).
-
+
Sets a Bean reference to an external
PlatformTransactionManager on the
underlying SimpleMessageListenerContainer. The transaction
@@ -228,7 +248,7 @@
http://static.springsource.org/spring-amqp/docs/1.0.x/reference/html/#d0e525
Optional.
-
+
Tells the SimpleMessageListenerContainer
how many messages to process in a single transaction (if
the channel is transactional). For best results it should
diff --git a/spring-integration-amqp/src/main/java/org/springframework/integration/amqp/support/DefaultAmqpHeaderMapper.java b/spring-integration-amqp/src/main/java/org/springframework/integration/amqp/support/DefaultAmqpHeaderMapper.java
index 0c59fecabc..fd61b37d5e 100644
--- a/spring-integration-amqp/src/main/java/org/springframework/integration/amqp/support/DefaultAmqpHeaderMapper.java
+++ b/spring-integration-amqp/src/main/java/org/springframework/integration/amqp/support/DefaultAmqpHeaderMapper.java
@@ -32,11 +32,14 @@ import org.springframework.util.StringUtils;
/**
* Default implementation of {@link AmqpHeaderMapper}.
*
- * This implementation copies AMQP properties (e.g. contentType) to and from
+ * By default this implementation will only copy AMQP properties (e.g. contentType) to and from
* Spring Integration MessageHeaders. Any user-defined headers within the AMQP
- * MessageProperties will also be copied from an AMQP Message to a Spring Integration
- * Message, and any other headers on a Spring Integration Message (beyond the standard
- * AMQP properties) will likewise be copied to an AMQP Message.
+ * MessageProperties will NOT be copied to or from an AMQP Message unless
+ * explicitly identified via 'requestHeaderNames' and/or 'replyHeaderNames'
+ * (see {@link AbstractHeaderMapper#setRequestHeaderNames(String[])}
+ * and {@link AbstractHeaderMapper#setReplyHeaderNames(String[])}}
+ * as well as 'mapped-request-headers' and 'mapped-reply-headers' attributes of the AMQP adapters).
+ * If you need to copy all user-defined headers simply use wild-card character '*'.
*
* Constants for the AMQP header keys are defined in {@link AmqpHeaders}.
*