Intermittent exception with GetMessage() API when getting messages from Windows Azure Queue Storage

Recently I experience the following  exception when using GetMessage() api to get messages from the Windows Azure Storage Queue:

at Microsoft.WindowsAzure.StorageClient.Tasks.Task`1.get_Result()
at Microsoft.WindowsAzure.StorageClient.Tasks.Task`1.ExecuteAndWait()
 at Microsoft.WindowsAzure.StorageClient.CloudQueue.GetMessagesInternal(Nullable`1 numberOfMessages, Nullable`1 visibilityTimeout)
at Microsoft.WindowsAzure.StorageClient.CloudQueue.GetMessages(Int32 messageCount, TimeSpan visibilityTimeout)
at Pepperplate.Worker.Cloud.WorkerRole.Run() in C:\SVN\PepperplateRoot\combined\Web\src\Pepperplate.Worker.Cloud\WorkerRole.cs:line 154

The source code looks like as below:

IEnumerable<CloudQueueMessage> allMessages = Queue.GetMessages(10, TimeSpan.FromMinutes(2));
foreach (CloudQueueMessage message in allMessages)
Response.Write(message.AsString + "<br />");

The same code was working fine so it was strange to see the error in the code. What turns out is an isolated code related issue and immediately taken care of temporarily. Azure Storage team known the this issue and working on it to fix the cause for the intermittent errors in a future service release.

Meantime if you hit this issue, please contact Windows Azure Support and there is no need to modify the code.


Comments (0)

Skip to main content