gpt4 book ai didi

azure - 如果多个 azure function 应用程序绑定(bind)到同一个存储队列以进行输入,会发生什么情况

转载 作者:行者123 更新时间:2023-12-02 19:56:04 25 4
gpt4 key购买 nike

我在两个不同的区域运行函数应用程序以实现冗余。即 azure 门户中有两个单独的应用程序(从相同的代码部署)。所以两个app都有输入绑定(bind)到同一个存储队列的功能。所有消息都会传递给两者还是消息会在两者之间分配?

我正在使用 C#、dotnet core 和 Functions 2.0。

最佳答案

您不必担心这一点。函数运行时将使用默认存储队列行为锁定消息。

来自the docs :

The queue trigger automatically prevents a function from processing a queue message multiple times; functions do not have to be written to be idempotent.

现在我知道文档正在谈论一个正在扩展的函数,但这同样适用于具有相同 qeueue 绑定(bind)的两个函数。

所以

Would all messages be delivered to both or would the messages get split between the two?

后者,消息将在两者之间分配。

关于azure - 如果多个 azure function 应用程序绑定(bind)到同一个存储队列以进行输入,会发生什么情况,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57005046/

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