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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With