Skip to content

Fix audited messages retaining mutated headers#7860

Open
w3lld1 wants to merge 1 commit into
Particular:masterfrom
w3lld1:fix/revert-audit-headers
Open

Fix audited messages retaining mutated headers#7860
w3lld1 wants to merge 1 commit into
Particular:masterfrom
w3lld1:fix/revert-audit-headers

Conversation

@w3lld1

@w3lld1 w3lld1 commented Jul 14, 2026

Copy link
Copy Markdown

Summary

  • snapshot incoming headers when the transport message is created
  • restore the original header values before creating the audited message
  • cover added, changed, and removed headers with unit and acceptance tests

Validation

  • dotnet build src --configuration Release --no-restore
  • all six test projects passed locally on Linux with .NET SDK 10.0.100 (NServiceBus.Core.Tests, NServiceBus.AcceptanceTests, NServiceBus.Core.Analyzer.Tests.Roslyn5, NServiceBus.TransportTests, NServiceBus.PersistenceTests, and NServiceBus.Learning.AcceptanceTests)

Fixes #7739

@CLAassistant

CLAassistant commented Jul 14, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@warwickschroeder

Copy link
Copy Markdown

Hi @w3lld1,

Thank you for your contribution! We’ve routed the PR to the appropriate team for evaluation.

If only small adjustments are needed, we’ll take care of them. If larger changes are required, we’ll either handle them ourselves (when we have capacity) or let you know what’s needed so you can choose whether to continue, or wait until we’re able to pick it up.

Kind regards,
The team at Particular

@mikeminutillo

Copy link
Copy Markdown
Member

Hi @w3lld1,

We need to dedicate some time to investigate the impact of this PR as it will create a new dictionary for every single message that runs through the pipeline.

Can you tell us what prompted you to raise this PR? Are you encountering an issue with the current behavior of the audit feature?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Headers modified during message processing are not reverted for audited messages

4 participants