在尝试从本地存储队列中检索消息时,我遇到了一些难以解释的奇怪现象。我相当确定这不会在使用实际 Azure 队列的生产环境中发生。
特别是导致此问题的行是:
msgs = await priorityQueue.GetMessagesAsync(Settings.NumberOfMessagesToGet, visibilityTimeSpan, null, null);
它将什么都不做,似乎永远不会回来。但是,将其替换为:
msgs = priorityQueue.GetMessages(Settings.NumberOfMessagesToGet, visibilityTimeSpan, null, null);
完成后返回,看起来很好。
我在这里使用 await 对吗?任何想法为什么这不起作用?
我正在使用 Windows Azure SDK 2.8 和 Windows Azure Storage Emulator 4.2.0.0,以防它提供任何线索。