Azure队列查看所有消息 [英] Azure Queue Peek All Messages

查看:120
本文介绍了Azure队列查看所有消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我了解Azure队列不是严格的FIFO。

Visual Studio Server Explorer仅显示32条消息。我的队列中有88条消息。

是否可以窥视Azure队列中的所有消息而不会出队列?

I understand that Azure Queue is not strict FIFO.
And Visual Studio Server Explorer shows only 32 messages. I have some 88 messages in the queue.
Is it possible to peek through all the messages in an Azure queue with out dequeing any of it?

推荐答案

您的问题的简单答案是不,您不能这样做。在邮件中进行窥视的原因不会改变其可见性,因此,除非您的邮件被其他过程取消排队,否则反复窥视将返回相同的消息。

Simple answer to your question is "No, you can't do that". Reason being Peeking at messages does not alter their visibility so unless your messages are being dequeued by some other process, repeated peeking will return same messages.

获取所有消息的唯一替代方法是具有较长可见性超时时间的 Get 消息(一次32条),然后一次又一次重复此过程直到这个时候,队列中没有任何消息可以出队。但是,您冒着这样的风险,即由于消息已经出队,因此无法通过此方法处理,因此其他任何调用者都不可见。

Only alternative to fetch all messages would be to Get messages (32 at a time) with long visibility timeout period and then repeating this process again and again till the time there are no messages in a queue that can be dequeued. However you run the risk of messages not getting processed with this approach as they have been dequeued and thus are not visible to any other callers.

这篇关于Azure队列查看所有消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆