Skip to content

Service Bus Explorer subscribing to a namespace listing all queues and messages causing settlement issues in a .NET 8 Worker Service subscriber that is being debugged/running on the same machine #858

@ajinkyaSurve

Description

@ajinkyaSurve

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions