Azure函数应用程序:我可以将MaxCurrentsess essestings放在应用程序设置配置中,例如服务总线配置

发布于 2025-02-13 11:05:55 字数 538 浏览 0 评论 0原文

我有以下设置以下设置host.json for maxConcurrentsessessions for Azure函数应用程序服务总线触发器。

"extensions": {
  "serviceBus": {
    "sessionHandlerOptions": {
      "autoComplete": false,
      "maxConcurrentSessions": 100
    }
  }
}

我可以设置此主机JSON配置功能应用程序配置应用程序设置(例如服务总线连接字符串)吗?如果是,怎么样?

I have below below settings host.json for maxConcurrentSessions for Azure Function app service bus trigger.

"extensions": {
  "serviceBus": {
    "sessionHandlerOptions": {
      "autoComplete": false,
      "maxConcurrentSessions": 100
    }
  }
}

Can I set this host json configuration Function App configuration application settings like service bus connection string? if Yes, how?

enter image description here

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

此岸叶落 2025-02-20 11:05:55

查看,您可以使用host.json使用AppSettings::

可能在某些情况下,您希望在host.json文件中为特定环境配置或修改特定设置,而无需更改host.json文件本身。您可以通过创建等效值作为应用程序设置来覆盖特定的主机。当运行时找到格式azurefunctionsjobhost__path__path_to_to_tos_setting的应用程序设置时,它覆盖了位于json中的path.to.to.setting的等效host.json设置。当表示为应用程序设置时,用于指示JSON层次结构的点()被双重下划线替换(__)。

因此,在您的情况下,定义appsetting azurefunctionsjobhost__extensions__servicebus__sessessessessesshandleroptions__maxConcurrentsessess将可以做到这一点。

Looking at the documentation, you can override settings defined in the host.json using appsettings:

There may be instances where you wish to configure or modify specific settings in a host.json file for a specific environment, without changing the host.json file itself. You can override specific host.json values by creating an equivalent value as an application setting. When the runtime finds an application setting in the format AzureFunctionsJobHost__path__to__setting, it overrides the equivalent host.json setting located at path.to.setting in the JSON. When expressed as an application setting, the dot (.) used to indicate JSON hierarchy is replaced by a double underscore (__).

So in you case defining an appsetting AzureFunctionsJobHost__extensions__serviceBus__sessionHandlerOptions__maxConcurrentSessions will do the trick.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文