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

Preserving native (transport) message ID #5391

Open
SeanFeldman opened this issue Jun 7, 2019 · 3 comments

Comments

Projects
None yet
3 participants
@SeanFeldman
Copy link
Contributor

commented Jun 7, 2019

Context

When an NServiceBus endpoint sends a message, the message sent might have two message IDs:

  1. A native message ID (from the underlying transport infrastructure)
  2. And NServiceBus message ID expressed by NServiceBus.MessageId header.

Issue

When there's a need to investigate what happened to processed or failed messages, there are audit and error messages. Unfortunately, those messages contain NServiceBus message ID only and have no reference to the native message ID of the processed messages, which are often required by the infrastructure provider to identify what happened to the original message. Access to the native message ID is not possible in Core as the message ID is replaced with NServiceBus.MessageId headers' value upon the physical message injection prior to the IIncomingPhysicalMessageContext invocation. This context, while exposing IncomingMessage, has no longer access to the native message ID as it's lost during IncomingMessage construction.

Suggestion

Allow access to the native message ID by adding it to the headers or expose another way to access that value. E.g. add a property to IncomingMessage to expose native message ID.

@ramonsmits

This comment has been minimized.

Copy link
Member

commented Jun 11, 2019

@SeanFeldman So ASB does set the transport value in the header but core overwrites the value? Would it be possible to add a behavior before that process that would clone the value to a header value using a different key?

@andreasohlund

This comment has been minimized.

Copy link
Member

commented Jun 11, 2019

@SeanFeldman

This comment has been minimized.

Copy link
Contributor Author

commented Jun 11, 2019

and core only uses it if there is no message id header present

Which is never the case if the message is sent by NServiceBus endpoint. Hence this issue 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.