Of course it helps if you're pointing at the right storage account.
Please ignore my question.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi Folks,
This queue has been working fine until today. I have fresh messages in a storage queue (I just added them) and when I call
QueueProperties properties = await theQueue.GetPropertiesAsync();
the approx count is 0.
I saw this queue-is-not-empty and this queue-shows-false-count
From a few years ago but none of the possible reasons mentioned seem to apply in my case. Message are new and unread. It doesn't appear to matter how many are there. The queue exists and looks like its being read, no errors anywhere as far as I can see.
This is my code to get & delete a message
QueueClient client = new QueueClient(connection, queue);
if (await client.ExistsAsync())
{
QueueProperties properties = await client.GetPropertiesAsync();
if (properties.ApproximateMessagesCount > 0)
{
QueueMessage[] qmsg = await client.ReceiveMessagesAsync(1);
string msg = qmsg[0].MessageText;
await client.DeleteMessageAsync(qmsg[0].MessageId, qmsg[0].PopReceipt);
return msg;
}
}
Sod's law this has happened at the end of a piece of development that is vital in a user registration story. I can't proceed without resolving this so any suggestions welcome and greatly appreciated.
Thanks in advance
Of course it helps if you're pointing at the right storage account.
Please ignore my question.