>我正在尝试获取队列和DeadLetterQueue中的消息计数。 常规队列有效。 死信没有。
这有效:
NamespaceManager
.CreateFromConnectionString(connectionString)
.GetQueue(queueName)
.MessageCount;
这将失败:
NamespaceManager
.CreateFromConnectionString(connectionString)
.GetQueue(queueName + "/$DeadLetterQueue")
.MessageCount;
错误消息是(已编辑(:
System.ArgumentException: The remote server returned an error: (400) Bad Request.
The specified HTTP verb (GET) is not valid.
这是不可能的吗?
使用 .属性而不是 。消息计数。MessageCountDetails有许多计数属性,其中一个是DLQ。