Azure.Messaging.ServiceBus 7.20.1 — DeadLetterAsync / AbandonAsync using AmqpWebSocket dropping messages silently when there is a instance of Service Bus Explorer subscribing to the same namespace running actively on same machine.
Summary
In Azure.Messaging.ServiceBus 7.20.1, calls to DeadLetterMessageAsync and AbandonMessageAsync
appear to silently drop messages instead of moving them to the dead-letter sub-queue or returning
them to the active queue for redelivery.
This is observed when a instance of Service Bus Explorer is running in parallel subscribing to the same namespace
Environment
|
|
| Package |
Azure.Messaging.ServiceBus |
| Version |
7.20.1 |
| Target framework |
.NET 8 |
| C# version |
12.0 |
| Host |
.NET Worker Service (Windows Service) |
| Queue mode |
PeekLock (manual settlement) |
Affected Settlement Calls
ServiceBusReceiver.DeadLetterMessageAsync(message, reason, description, cancellationToken)
ServiceBusReceiver.AbandonMessageAsync(message, cancellationToken)
Observed Behavior
Service Bus Explorer is running in parallel subscribing to the same namespace
DeadLetterMessageAsync completes without throwing, but the message does not appear in the
dead-letter sub-queue ($DeadLetterQueue).
AbandonMessageAsync completes without throwing, but the message is not requeued and the
DeliveryCount is not incremented.
- In both cases, the message is silently dropped — no exception, no log from the SDK, no trace.
- No trace of messages in Azure SBN broker checked through portal
- DeadLetter and Abandon actions recorded in App Insights.
- Stopping the Service Bus Explorer lets the messages settle through the debugged Worker Service as expected using DeadLetterAsync and AbandonAsync.
Expected Behavior
Service Bus Explorer is running in parallel subscribing to the same namespace
DeadLetterMessageAsync called from within a .Net 8 Worker Service being debugged locally should move the message to <queue>/$DeadLetterQueue with the supplied deadLetterReason and deadLetterErrorDescription properties set.
AbandonMessageAsync called from within a .Net Worker Service being debugged locally should release the message lock and return the message to the active queue, incrementing DeliveryCount.
Reproduction Steps
Run Service Bus Explorer by connecting to a specific Service Bus Namespace
Using the same Service Bus Namespace inside a .NET 8 Worker Service perform settlement calls on messages subscribed from a given queue.
Azure.Messaging.ServiceBus 7.20.1 — DeadLetterAsync / AbandonAsync using AmqpWebSocket dropping messages silently when there is a instance of Service Bus Explorer subscribing to the same namespace running actively on same machine.
Summary
In
Azure.Messaging.ServiceBus7.20.1, calls toDeadLetterMessageAsyncandAbandonMessageAsyncappear to silently drop messages instead of moving them to the dead-letter sub-queue or returning
them to the active queue for redelivery.
This is observed when a instance of Service Bus Explorer is running in parallel subscribing to the same namespace
Environment
Azure.Messaging.ServiceBus7.20.1.NET 812.0Affected Settlement Calls
ServiceBusReceiver.DeadLetterMessageAsync(message, reason, description, cancellationToken)ServiceBusReceiver.AbandonMessageAsync(message, cancellationToken)Observed Behavior
Service Bus Exploreris running in parallel subscribing to the same namespaceDeadLetterMessageAsynccompletes without throwing, but the message does not appear in thedead-letter sub-queue (
$DeadLetterQueue).AbandonMessageAsynccompletes without throwing, but the message is not requeued and theDeliveryCountis not incremented.Expected Behavior
Service Bus Exploreris running in parallel subscribing to the same namespaceDeadLetterMessageAsynccalled from within a .Net 8 Worker Service being debugged locally should move the message to<queue>/$DeadLetterQueuewith the supplieddeadLetterReasonanddeadLetterErrorDescriptionproperties set.AbandonMessageAsynccalled from within a .Net Worker Service being debugged locally should release the message lock and return the message to the active queue, incrementingDeliveryCount.Reproduction Steps
Run
Service Bus Explorerby connecting to a specific Service Bus NamespaceUsing the same Service Bus Namespace inside a .NET 8 Worker Service perform settlement calls on messages subscribed from a given queue.