Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要跟踪处理 azure 存储队列中的消息并在 N 次不成功尝试后删除消息的失败尝试次数。
我已经搜索过,但没有找到任何自动执行此操作的特定属性,并且想知道除了在存储表中使用计数器之外是否还有其他方法。
每个云队列消息都有一个 DequeueCount 属性。这有帮助吗?
REST API 参考这里。
至于如何在n次尝试后自动删除消息:没有什么可以自动执行此操作。您需要根据 DequeueCount 在 Windows Azure 队列中实现自己的有害消息处理。
或者,Azure 服务总线队列有一个用于无法送达消息(或无法处理的消息)的死信队列。更多信息在这里。