Azure Queue Peek All Messages

二次信任 提交于 2019-12-02 16:30:05

问题


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?


回答1:


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.

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.



来源:https://stackoverflow.com/questions/26485608/azure-queue-peek-all-messages

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!