简体   繁体   English

Azure ServiceBus队列活动消息计数器是否中断?

[英]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: 队列配置:

  • Message time to live (default) - 14 days 邮件生存时间(默认)-14天
  • Lock duration - 30 sec. 锁定时间-30秒。
  • Duplicate detection history - 10 min 重复检测历史记录-10分钟
  • Maximum Delivery Count - 10 最大交货数量-10
  • Maximum size - not set 最大尺寸-未设置
  • Queue state - Active 队列状态-活动
  • Relocate to Dead letter - not enabled 移至死信-未启用
  • Current Size - 3447.3994140625 KB 当前大小-3447.3994140625 KB
  • Updated at - 12.01.2017, 11:56:40 更新于-12.01.2017,11:56:40
  • Enable Partitioning - true 启用分区-true

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM