Azure 服务总线功能

Azure Service Bus Feature

我有一个关于 azure Bus 的简单问题,我正在尝试将它与 azure 函数一起使用,并且我打算降低 azure 函数的成本,因为轮询 azure 服务总线以获取消息有没有办法收到消息时,消息从 Azure 服务总线发送到端点。不使用事件网格 ?

是的!按照 Sead Feldman 的说法,这是真的。代表您,它在触发功能时由服务总线轮询,如果消息可用,它会给出。

据我所知,由于底层服务架构,ServiceBusTrigger 是基于轮询

根据此MSFT Documentation,Azure 服务总线的特征是:

is a reliable asynchronous message delivery (enterprise messaging as a service) that requires polling

GitHub 中注册了相同的问题,即服务总线队列触发器的轮询成本很高,即使在 Azure Functions 的零 activity 中也是如此。

根据 GitHub 的讨论,切换到 Azure Event Grid Trigger is the good option because Azure Service Bus integrates with Azure Event Grid,因为服务总线会在有新消息阻止您进行轮询时将事件发送到 Azure EventGrid。