Skip to content

Commit d3bd3ff

Browse files
authored
More guidance on how to do application-level dead-lettering
1 parent 451e859 commit d3bd3ff

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

articles/service-bus-messaging/service-bus-dead-letter-queues.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ If you enable dead-lettering on filter evaluation exceptions, any errors that oc
5353
## Application-level dead-lettering
5454
In addition to the system-provided dead-lettering features, applications can use the DLQ to explicitly reject unacceptable messages. They can include messages that can't be properly processed because of any sort of system issue, messages that hold malformed payloads, or messages that fail authentication when some message-level security scheme is used.
5555

56+
This can be done by calling [QueueClient.DeadLetterAsync(Guid lockToken, string deadLetterReason, string deadLetterErrorDescription) method](/dotnet/api/microsoft.servicebus.messaging.queueclient.deadletterasync?view=azure-dotnet#microsoft-servicebus-messaging-queueclient-deadletterasync(system-guid-system-string-system-string)).
57+
58+
It is recommended to include the type of the exception in the DeadLetterReason and the StackTrace of the exception in the DeadLetterDescription as this makes it easier to troubleshoot the cause of the problem resulting in messages being dead-lettered.
59+
5660
## Dead-lettering in ForwardTo or SendVia scenarios
5761
Messages will be sent to the transfer dead-letter queue under the following conditions:
5862

0 commit comments

Comments
 (0)