Skip to content

[Host.AzureServiceBus] Allow Passing Custom Properties in DeadLetter Response #366

@przemyslaw-serwicki

Description

@przemyslaw-serwicki

Description

Currently, when using Azure Service Bus (ASB) transport with a custom implementation of ServiceBusConsumerErrorHandler, we can supply custom properties using the Failure response.

However, there is no equivalent way to pass custom properties when using DeadLetter.

It would be useful to have the ability to include additional attributes (key-value properties) in the DeadLetter response, similar to how it's done with Failure.

Proposed Change

Please enhance DeadLetter to allow passing custom properties as a dictionary

var properties = new Dictionary<string, object>
{
    { "SMB.Exception", exception.Message }
};

return Task.FromResult(DeadLetter("reason", "description", properties));

Reference Implementation

A similar feature was recently added for Failure responses: #365

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions