[英]Azure ServiceBus Queue active messages counter broken?
We have an issue with ServiceBus service. 我们在ServiceBus服务方面遇到问题。 We have a Queue that contains messages, also we have Continuous WebJob that has OnMessage listener for new messages, everithing works fine, but there is one strange problem.
我们有一个包含消息的队列,也有一个连续WebJob,它具有用于新消息的OnMessage侦听器,一切正常,但是有一个奇怪的问题。 Active message counter never shows less then 2789 Active Messages in Queue.
活动消息计数器在队列中永远不会显示少于2789条活动消息 。 New messages recieved correcly.
正确收到了新消息。 We tried to recieve messages by Recieve method, but result is the same.
我们试图通过Recieve方法接收消息,但是结果是相同的。 Seems something wrong with counter.
计数器似乎有问题。
Queue configuration: 队列配置:
Any ideas will be helpfull. 任何想法都会有所帮助。
SOLVED:
解决了:
Those messages were in Defer state, we used QueueClient.Peek()
to get the message, then 这些消息处于Defer状态,我们使用
QueueClient.Peek()
获取消息,然后
var m = QueueClient.Recieve(message.SequenceNumber);
m.Complete();
and messages are Gone! 消息消失了!
These messages might be deferred. 这些消息可能会被延迟。 Which means they are Active, but won't be automatically delivered to OnMessage.
这意味着它们是活动的,但不会自动传递到OnMessage。 You need to know their sequence number to process them in a specific way, see documentation on how.
您需要知道它们的序列号以特定方式处理它们,请参阅有关方法的文档。 Or you can use Service Bus Explorer tool to look at the messages directly, and or re-process them as necessary.
或者,您可以使用Service Bus Explorer工具直接查看消息,或者根据需要重新处理它们。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.