You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* GH-3089: Add AmqpInGateway.replyHeadersMappedLast
Fixes#3089
In some use-case we would like to control when headers from SI message
should be populated into an AMQP message.
One of the use-case is like a `SimpleMessageConverter` and its `plain/text`
for the String reply, meanwhile we know that this content is an
`application/json`.
So, with a new `replyHeadersMappedLast` we can override the mentioned
`content-type` header, populated by the `MessageConverter` with an
actual value from the message headers populated in the flow upstream
* Introduce an `AmqpInboundGateway.replyHeadersMappedLast`; expose it
on the DSL and XML level
* Use newly introduced `MappingUtils.mapReplyMessage()`
* Optimize `DefaultAmqpHeaderMapper` to not parse JSON headers at all
when `JsonHeaders.TYPE_ID` is already present (e.g. `MessageConverter`
result)
* Also skip `JsonHeaders` when we `populateUserDefinedHeader()`
**Cherry-pick to 5.1.x**
* * Fix language and package typos
* Add missed `@param` in JavaDoc of the `AmqpBaseInboundGatewaySpec.batchingStrategy()`
* Extract a `RabbitTemplate` `MessageConverter` to use for reply messages
conversion - pursue a backward compatibility
Copy file name to clipboardExpand all lines: spring-integration-amqp/src/main/java/org/springframework/integration/amqp/config/AmqpInboundGatewayParser.java
Copy file name to clipboardExpand all lines: spring-integration-amqp/src/main/java/org/springframework/integration/amqp/dsl/AmqpBaseInboundGatewaySpec.java
Copy file name to clipboardExpand all lines: spring-integration-amqp/src/main/java/org/springframework/integration/amqp/inbound/AmqpInboundGateway.java
Copy file name to clipboardExpand all lines: spring-integration-amqp/src/main/java/org/springframework/integration/amqp/support/DefaultAmqpHeaderMapper.java
Copy file name to clipboardExpand all lines: spring-integration-amqp/src/main/resources/org/springframework/integration/amqp/config/spring-integration-amqp-5.2.xsd
+15-3Lines changed: 15 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -67,11 +67,11 @@
67
67
received within the confirm timeout or a negative acknowledgment or returned
68
68
message is received, an exception will be thrown.
69
69
</xsd:documentation>
70
-
<xsd:simpleType>
71
-
<xsd:unionmemberTypes="xsd:boolean xsd:string" />
72
-
</xsd:simpleType>
73
70
</xsd:appinfo>
74
71
</xsd:annotation>
72
+
<xsd:simpleType>
73
+
<xsd:unionmemberTypes="xsd:boolean xsd:string" />
74
+
</xsd:simpleType>
75
75
</xsd:attribute>
76
76
</xsd:extension>
77
77
</xsd:complexContent>
@@ -254,6 +254,18 @@
254
254
</xsd:documentation>
255
255
</xsd:annotation>
256
256
</xsd:attribute>
257
+
<xsd:attributename="reply-headers-last">
258
+
<xsd:annotation>
259
+
<xsd:documentation>
260
+
Whether reply headers are mapped before or after conversion from a messaging Message to
261
+
a spring amqp Message. Set to true, for example, if you wish to override the
0 commit comments