NServiceBus.Transport.AzureServiceBus icon indicating copy to clipboard operation
NServiceBus.Transport.AzureServiceBus copied to clipboard

Native Message ID is not set based on `NServiceBus.MessageId` header causing incompatibility with native integrations

Open kbaley opened this issue 3 years ago • 0 comments

This issue was transferred from a private repository

Users sometimes want to set the native message ID of the outgoing message for ASB which currently is initialized with a random guid. They are dealing with native integrations and do not want the receiver to be required using the NServiceBus.MessageId.

The comment in the code is:

// Cannot re-use MessageId to be compatible with ASB transport that could have native de-dup enabled

As the comment suggested, when native de-duplication is enabled, this causes problems, including message loss on second-level retries. ASB also provides access to the native message which users can use to promote it into the headers within a pipeline. However, for users that don't plan to ever use native de-deduplication, perhaps we can provide alternatives like a transport setting or a send option.

kbaley avatar Jul 25 '22 21:07 kbaley