azure-queues

Writing a listner to Azure Queue

陌路散爱 提交于 2019-11-28 01:27:54
问题 I have seen most queue example as the polling mechanism . Is it possible to change it to listner of the queue. Because polling may affect the performance of the worker. 回答1: Both Windows Azure Storage Queues and Windows Azure Service Bus Queues utilize polling and do not have a notification feature per se; however, Windows Azure Service Bus Queues do support long polling which is as close to a notification approach as you can get currently. When you use the Receive method from MessageReceiver

Determining how many messages are on the Azure Service Bus Queue

你离开我真会死。 提交于 2019-11-27 19:19:51
问题 I know there is a way to determine the number of messages (or approximate number) in the Azure Queue (Store Account); however is there a way to query for the number of pending messages on an Azure Service Bus queue? 回答1: var nsmgr = Microsoft.ServiceBus.NamespaceManager.CreateFromConnectionString(connectionString); long count = nsmgr.GetQueue(queueName).MessageCount; 回答2: It is called MessagesCountDetails.ActiveMessageCount. It returns the number of the Active Messages in the Queue. You