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
In what version(s) of Spring Integration are you seeing this issue?
5.5.11
Describe the bug
MessageHistory does not copy the original message when handling an errormessage.
When we use messagehistory in an integration flow the original message in the errormessage is always null. When we do not use messagehistory the originalmessage in the errormessage is not null and corresponds to the originalmessage.
We are listening for errors and then checking by using this:
System.out.println("IS ORIGINAL MESSAGE NULL? :" + (message.getOriginalMessage() == null));
Expected behavior
The original message is copied along to the new message
Fixesspring-projects#3843
The `MessageHistory.write()` is missing the `ErrorMessage.originalMessage`
on creating a new `ErrorMessage` with message history header
* Reuse an `ErrorMessage.originalMessage` for newly created `ErrorMessage`
after populating the message history header
**Cherry-pick to `5.5.x`**
Fixes#3843
The `MessageHistory.write()` is missing the `ErrorMessage.originalMessage`
on creating a new `ErrorMessage` with message history header
* Reuse an `ErrorMessage.originalMessage` for newly created `ErrorMessage`
after populating the message history header
**Cherry-pick to `5.5.x`**
Fixes#3843
The `MessageHistory.write()` is missing the `ErrorMessage.originalMessage`
on creating a new `ErrorMessage` with message history header
* Reuse an `ErrorMessage.originalMessage` for newly created `ErrorMessage`
after populating the message history header
**Cherry-pick to `5.5.x`**
In what version(s) of Spring Integration are you seeing this issue?
5.5.11
Describe the bug
MessageHistory does not copy the original message when handling an errormessage.
When we use messagehistory in an integration flow the original message in the errormessage is always null. When we do not use messagehistory the originalmessage in the errormessage is not null and corresponds to the originalmessage.
Code part here:
spring-integration/spring-integration-core/src/main/java/org/springframework/integration/history/MessageHistory.java
Line 113 in ba8a26f
To Reproduce
Add messagehistory to any flow producing an error.
Flow details:
<si:channel fixed-subscriber="false" id="tstrrr.rrrmssg.entry.channel.channel"/>
<si:inbound-channel-adapter channel="tstrrr.rrrmssg.entry.channel.channel" expression="'hallo'" id="tstrrr.rrrmssg.entry.receive.InboundError">
<si:poller fixed-delay="5" time-unit="SECONDS"/>
</si:inbound-channel-adapter>
<si:service-activator input-channel="tstrrr.rrrmssg.entry.channel.channel" expression="payload[10]" id="tstrrr.rrrmssg.entry.activate.serviceActivator" requires-reply="false"/>
We are listening for errors and then checking by using this:
System.out.println("IS ORIGINAL MESSAGE NULL? :" + (message.getOriginalMessage() == null));
Expected behavior
The original message is copied along to the new message
Sample
The text was updated successfully, but these errors were encountered: