Start obsoleting the usage of IncomingMessage on the error context#7741
Merged
andreasohlund merged 8 commits intomasterfrom May 6, 2026
Merged
Start obsoleting the usage of IncomingMessage on the error context#7741andreasohlund merged 8 commits intomasterfrom
andreasohlund merged 8 commits intomasterfrom
Conversation
…d the recoverability context interfaces since the incoming message is now mostly only used during unwrapping of the onMessage handling but the message context has already standardized on a flat structure instead of using the IncomingMessage abstraction
…d of `IncomingMessage` abstraction.
1bdfc90 to
25de2e7
Compare
DavidBoike
reviewed
May 5, 2026
Co-authored-by: David Boike <david.boike@gmail.com>
4b559aa to
b97b6d6
Compare
…tartNewTrace header
…ettering can also benefit from it.
andreasohlund
approved these changes
May 6, 2026
Contributor
Author
|
Small follow up #7743 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow up on #7662
This PR flattens the relevant
IncomingMessagedata onto the pipeline and error contexts.Instead of requiring consumers to go through an
IncomingMessageinstance to access message details, the contexts now expose the message information directly. This makes the pipeline/error context the primary surface for message-processing state and better reflects thatIncomingMessageis created as part of the pipeline flow, after envelope unwrapping.Motivation
During review, it became clear that
IncomingMessageshould be treated as a pipeline concept. The envelope unwrapper is responsible for creating it from the transport-provided message context, which means the pipeline context already has the information needed to represent the message being processed.Given that, carrying an
IncomingMessageobject around as the main way to access message state makes the context model less clear. The properties that are needed by pipeline behaviors and error/recoverability handling belong directly on the corresponding contexts.This also avoids having Core duplicate preservation logic around nested message objects. The transport provides the original message data, the pipeline creates the incoming message representation, and the contexts expose the relevant message state directly where it is used.
Changes
IncomingMessageproperties onto the pipeline context as flat context properties.IncomingMessage.Behavioral impact
There should be no intended behavioral change in how messages are processed, retried, or moved to the error queue.
The change is primarily a context-modeling refactor:
IncomingMessage.This makes the ownership boundaries clearer: