Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure Queue Peek All Messages

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?

like image 395
Srinivas Avatar asked Dec 14 '22 19:12

Srinivas


1 Answers

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.

like image 122
Gaurav Mantri Avatar answered Jan 25 '23 05:01

Gaurav Mantri