确定有多少消息是对Azure的服务总线队列 [英] Determining how many messages are on the Azure Service Bus Queue

查看:182
本文介绍了确定有多少消息是对Azure的服务总线队列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道有一种方法来确定的Azure队列(Store帐户)消息(或近似数)的数量;然而,有一种方法来查询待处理的邮件上的Azure的服务总线的排队?


解决方案

VAR nsmgr = Microsoft.ServiceBus.NamespaceManager.CreateFromConnectionString(的connectionString);
长计数= nsmgr.GetQueue(QUEUENAME).MessageCount;

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?

解决方案

var nsmgr = Microsoft.ServiceBus.NamespaceManager.CreateFromConnectionString(connectionString);
long count = nsmgr.GetQueue(queueName).MessageCount;

这篇关于确定有多少消息是对Azure的服务总线队列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆