gpt4 book ai didi

Azure Functions - 服务总线扩展

转载 作者:行者123 更新时间:2023-12-03 01:49:11 24 4
gpt4 key购买 nike

我有一个 azure 函数,使用动态消费计划监听服务总线队列触发器。基于此 host.json 配置文档...

https://github.com/Azure/azure-webjobs-sdk-script/wiki/host.json

...您可以设置以下值

"serviceBus": {
// The maximum number of concurrent calls to the callback the message
// pump should initiate. The default is 16.
"maxConcurrentCalls": 16,
// The default PrefetchCount that will be used by the underlying MessageReceiver.
"prefetchCount": 100
},

是否有任何有关设置上述内容以与功能一起使用的文档 - 特别是使用消耗计划。

服务总线性能最佳实践文档建议:

https://learn.microsoft.com/en-us/azure/service-bus-messaging/service-bus-performance-improvements

When using the default lock expiration of 60 seconds, a good value for >SubscriptionClient.PrefetchCount is 20 times the maximum processing rates of >all receivers of the factory. For example, a factory creates 3 receivers, and >each receiver can process up to 10 messages per second. The prefetch count >should not exceed 20*3*10 = 600. By default, QueueClient.PrefetchCount is set >to 0, which means that no additional messages are fetched from the service.

有人可以解释一下这些是/应该如何在函数中使用的吗?

谢谢!

最佳答案

查看ASB code for Azure WebJobs (函数的基础)看起来好像创建了一个接收器。因此,您看到的设置考虑了创建的单个接收器。

ASB 性能文档描述了一个场景,您可以在其中创建自己的消息泵并控制工厂和接收器的数量。

关于Azure Functions - 服务总线扩展,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41401857/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com