Closed spring-operator closed 6 years ago
Gary Russell commented
This was changed in 5.0 to be consistent; previously the order of header mapping was inconsistent, depending on which message converter was being used. This was made the default to avoid unexpected header propagation from upstream endpoints.
Set headersMappedLast
to ensure headers in the outbound message take precedence over those set by the message converter.
Although this was covered in the what's new and a note in this section I have now added a mention of the behavior change to the 5.0 migration guide.
Oleg Zhurakousky opened INT-4359 and commented
While working on semi-relevant issue in Spring Cloud Stream, I've discovered that there is some voodoo in MappingUtils.mapMessage(..). Here is the relevant code snippet:
Line 1; MessageProperties are created with contentType "application/octet-stream" Line 4: It is changed to "text/plain" by getting it from MessageHeaders Line 6; It is back to "application/octet-stream" simply based on the payload type (which is byte[] - always in the case of SCSt)
I see there were significant changes in MappingUtils between SI 4 and 5 and this appears to be a regression
Affects: 5.0 M7
Issue Links:
8190 AMQP: Provide More Control Over Outbound contentType