Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preserve the originalMessage when creating an ErrorMessage in MessageBuilder #23417

Conversation

@L00kian
Copy link
Contributor

L00kian commented Aug 5, 2019

Hello,

I was creating a small POC using spring integration and for some cases I noticed that Gateways that use messagingTemplate underneath do not preserve the original message when sending a related ErrorMessage to the error channel.

I didn't find any better place to address that.

In my opinion original message worth preserving in any case. However there is another possibility to pass the MessageBuilder.originalMessage link without unwrapping it

…ew ErrorMessage using MessageBuilder.fromMessage method.
@L00kian

This comment has been minimized.

Copy link
Contributor Author

L00kian commented Aug 6, 2019

Also if the aforementioned is the case - it might be worthwhile to apply the same flow for org.springframework.integration.support.MessageBuilder#build implementation from integration-core package

@rstoyanchev rstoyanchev self-assigned this Nov 8, 2019
@rstoyanchev rstoyanchev added this to the 5.2.2 milestone Nov 8, 2019
@rstoyanchev rstoyanchev changed the title Preserve the originalMessage when creating new message using MessageBuilder Preserve the originalMessage when creating an ErrorMessage in MessageBuilder Nov 8, 2019
rstoyanchev added a commit that referenced this pull request Nov 8, 2019
@rstoyanchev

This comment has been minimized.

Copy link
Contributor

rstoyanchev commented Nov 8, 2019

This has been merged with some minor polishing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.