我正在使用Azure存储模拟器。我有一个CloudQueue和一些消息。 例如,我想检索出队数大于3的邮件数。
我可以对所有消息进行循环处理,并在消息的出队计数> 3时增加计数器的数量,但是我想找到一种优化的替代方法。
获取队列后如何应用过滤器?
CloudStorageaccount storageaccount = CloudStorageaccount.Parse(Configurationmanager.AppSettings["StorageConnection"];
CloudQueueclient queueclient = storageaccount.CreatecloudQueueclient();
CloudQueue queue = queueclient.GetQueueReference("testQueue");
queue.CreateIfNotExists();
queue.FetchAttributes();