azure - Azure 客户端 .OnMessage 是否为空队列生成计费请求?

标签 azure servicebus azureservicebus azure-servicebus-queues

您可以使用 SubscriptionClient/QueueClient 的 .OnMessage 调用订阅来自 Azure 主题和队列的异步更新,这可能会创建一个单独的线程,使用默认设置轮询主题/队列,并在以下情况下调用定义的回调:它接收任何东西。

Azure网站称接收消息是一项计费操作,这是可以理解的。但是,即使这些轮询请求没有返回任何内容(即相关队列没有待处理的消息),是否仍将其视为可计费,这一点还不够明确。

最佳答案

基于Azure Service Bus Pricing FAQ - 你的问题的答案是肯定的

In general, management operations and “control messages,” such as completes and deferrals, are not counted as billable messages. There are two exceptions:

Null messages delivered by the Service Bus in response to requests against an empty queue, subscription, or message buffer, are also billable. Thus, applications that poll against Service Bus entities will effectively be charged one message per poll.

Setting and getting state on a MessageSession will also result in billable messages, using the same message size-based calculation described above.

鉴于价格为每 10,000 条消息 0.01 美元,我认为您不必对此过于担心。

关于azure - Azure 客户端 .OnMessage 是否为空队列生成计费请求?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21687656/

相关文章:

azure - 应用程序 channel 和机器人 channel 有什么区别?

database - Mule ESB数据流设计

适用于 Windows Server 的 ServiceBus 上的 Java - 选项?

c# - 无法验证 Windows Server 证书的服务总线

azure - Azure 服务总线异常中的 "SystemTracker"是什么?

c# - Microsoft Azure 服务总线超时异常

azure - 捕获发送到没有订阅或已过滤掉的 Azure 服务总线主题的消息?

azure - 使用 Azure 函数检查 Blob 存储上是否存在文件

scala - Spark saveAsTextFile 到 Azure Blob 创建一个 blob 而不是文本文件

azure - 负载平衡 Azure Service Fabric 服务监听 URI 前缀