How do you get the count of dead letter messages in an Azure Service Bus queue?
问题 How do you get the count of dead letter messages in an Azure Service Bus queue? I can get the count in the queue like so ... var ns = NamespaceManager.CreateFromConnectionString(sbConnectionString); var queue = ns.GetQueue(queueName); var count = queue.MessageCount; But this looks to include both messages in the queue, and also messages in the associated dead letter queue How can I differentiate between them? 回答1: Do take a look at MessageCountDetails property in QueueDescription. You will