Skip to content

Commit af85e7f

Browse files
authored
Merge pull request #99909 from udidahan/patch-1
More guidance on how to do application-level dead-lettering
2 parents 6fbbbdb + 075338f commit af85e7f

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#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. Be aware that this may result in some messages exceeding [the 256KB quota limit for the Standard Tier of Azure Service Bus](/azure/service-bus-messaging/service-bus-quotas), further indicating that the Premium Tier is what should be used for production environments.
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)