工作场景:
- 将 Msg1 发布到主题
- 将 Msg2 发布到主题
- 读取 Msg1、Msg2
不工作:
- 将 Msg1 发布到主题
- 通过订阅者从主题中读取 Msg1,但我没有标记为完成。(仍在队列中)
- 将 Msg2 发布到主题
读Msgs..实际:我只读Msg2 期望:想读Msg1,Msg2。
if (namespaceManager.TopicExists(topic)) { var lstOfValues = new List<SITConfirmation>(); SubscriptionClient Client = SubscriptionClient.CreateFromConnectionString(ConfigurationManager.ConectionString(), topic, subscriber); IEnumerable<BrokeredMessage> messages = await Client.ReceiveBatchAsync(10, TimeSpan.FromMilliseconds(500)); }