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 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.
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Aug 5, 2019
@L00kian
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 added in: messaging Issues in messaging modules (jms, messaging) type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Nov 8, 2019
@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 pushed a commit that referenced this pull request Nov 8, 2019
@rstoyanchev
Copy link
Contributor

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
Labels
in: messaging Issues in messaging modules (jms, messaging) type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants