I have an Azure Storage Queue and want to create a service to view the contents of for admin-purposes. I know I can view the queue using Storage Explorer, but I want to be able to view the messages (and their contents) in a C# application.
From what I can see, the API allows me to get the write to and pop from the head of the queue, but I need to see all messages without removing them.
2
Answers
What you need to use is PeekMessagesAsync, with that you can peek the first X messages in the queue. Example:
Next you can do whatever you want with it.
try using the following code:
it uses
Azure.Messaging.ServiceBus
.Hope this helps.