- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我想在我的Azure函数中实现一个非常简单的行为:如果在处理过程中出现异常,我想推迟下一次重试一段时间。据我所知,在服务总线中没有直接的可能性,例如(除非创建一条新消息),但服务总线触发器有可能进行ExponentialBackoffRetry
。
我还没有找到任何有关服务总线连接如何工作的文档。 IE。函数执行失败后消息会发生什么情况。
一种可能的方法是将消息保留在函数基础设施中,并在我认为的持续时间内不断更新锁定。关于我想知道的一些更实际的问题:
最佳答案
来自documentation :
Using retry support on top of trigger resilience
The function app retry policy is independent of any retries or resiliency that the trigger provides. The function retry policy will only layer on top of a trigger resilient retry. For example, if using Azure Service Bus, by default queues have a message delivery count of 10. The default delivery count means after 10 attempted deliveries of a queue message, Service Bus will dead-letter the message. You can define a retry policy for a function that has a Service Bus trigger, but the retries will layer on top of the Service Bus delivery attempts.
For instance, if you used the default Service Bus delivery count of 10, and defined a function retry policy of 5. The message would first dequeue, incrementing the service bus delivery account to 1. If every execution failed, after five attempts to trigger the same message, that message would be marked as abandoned. Service Bus would immediately requeue the message, it would trigger the function and increment the delivery count to 2. Finally, after 50 eventual attempts (10 service bus deliveries * five function retries per delivery), the message would be abandoned and trigger a dead-letter on service bus.
对于指数重试,您可能需要将总退避时间+处理时间保持在小于函数可以保留消息的时间,否则锁定将过期,甚至成功处理也会导致异常并重试。
就目前服务总线锁定消息的方式而言,Azure 服务总线上的指数退避并不是一个好主意。一旦持久终点成为可能(无限锁定时间,无需更新),这将更有意义。
更新:函数重试功能正在 deprecated .
关于azure - ExponentialBackoffRetry 如何与 Azure 函数的 ServiceBus 触发器配合使用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67869677/
Microsoft 将于 2021 年 11 月停止支持服务总线的经典 API(如 here 所述) 在我们的代码中,我们使用 WindowsAzure.ServiceBus包裹。这是一个 ol 软件
我正在迁移到 Azure.Messaging.ServiceBus,并注意到现在不再有名为 Label 的属性 这是一个巨大的问题,因为我们的服务总线规则中使用标签来过滤订阅上的消息。 使用 Azur
我正在迁移到 Azure.Messaging.ServiceBus,并注意到现在不再有名为 Label 的属性 这是一个巨大的问题,因为我们的服务总线规则中使用标签来过滤订阅上的消息。 使用 Azur
我创建了一个非常简单的控制台应用程序,它连接到 Azure ServiceBus 并发送一条消息。我尝试了 Microsoft 的最新库 (Microsoft.Azure.ServiceBus),但无
我有一个使用 Microsoft.Azure.ServiceBus 的消息发布者,需要将其替换为 Azure.Messaging.ServiceBus,因为它现已弃用。 这是代码: using Mic
我(尝试)使用此代码来创建 ServiceBus 队列: using Azure.Messaging.ServiceBus; using Azure.Messaging.ServiceBus.Admi
我正在尝试更新此函数以使用 Azure.Messaging.ServiceBus 并完全删除 Microsoft.Azure.ServiceBus,但似乎找不到任何相关资源。有人知道如何使用这个包向主
我(尝试)使用此代码来创建 ServiceBus 队列: using Azure.Messaging.ServiceBus; using Azure.Messaging.ServiceBus.Admi
我正在尝试更新此函数以使用 Azure.Messaging.ServiceBus 并完全删除 Microsoft.Azure.ServiceBus,但似乎找不到任何相关资源。有人知道如何使用这个包向主
我的客户端是在框架 4.5.1 上运行的 WebForm(使用 Microsoft.ServiceBus 1_1,我的服务器是在 azure 上运行的 .netcore。 服务总线在 Azure 上运
我的客户端是在框架 4.5.1 上运行的 WebForm(使用 Microsoft.ServiceBus 1_1,我的服务器是在 azure 上运行的 .netcore。 服务总线在 Azure 上运
我已开始使用 Azure 中的 Azure 服务总线。通过互联网上的一些引用资料,人们似乎使用 Microsoft.ServiceBus.Messaging 中的 BrokeredMessage 类,
我有一段时间编写的客户端使用旧库并调用 GetBody()接收消息时读取正文。 现在我有了新客户 Microsoft.Azure.ServiceBus (发送消息)据我所知总是使用 Stream .
我有几个网站在 Azure 中运行,大量使用 ServiceBus(也在 Azure 中托管),全部位于一个区域。 有时(每 2-3 天一次)我同时在所有网站上出现相同的错误(在阅读/等待消息期间):
我知道 Rebus 完全有能力将消息从 A 点传输到 B(使用 MSMQ 作为传输层)。为了让事情完全清楚,Rebus 是否也能够进行一对多消息传递,即从 A 点发送的消息应该在 B 点和 C 点结束
在 SOA 项目中使用服务总线架构的优缺点是什么? 您会推荐哪些建议的开源服务总线平台? 提前致谢 最佳答案 我认为服务总线的优缺点与您项目中的要求有关。它可以根据需要进行调整。 您可以使用 JMS
在代码中我需要原子地: //write to a database table //publish EventA to service bus //write to another database
我对使用服务总线和其他 Azure 功能还很陌生。在 Azure 门户上手动创建服务总线后,我尝试弄清楚如何自动实现这一点。经过一段时间的阅读后,我认为使用 azure 资源管理器应该是正确的选择。仅
很难说出这里问的是什么。这个问题是含糊的、模糊的、不完整的、过于宽泛的或修辞性的,无法以目前的形式得到合理的回答。如需帮助澄清此问题以便重新打开它,visit the help center 。 已关
我正在将 Microsoft Azure ServiceBus 用于队列消息,并使用 WCF 进行订阅。我正在尝试实现重试逻辑。我使用 Peak/Lock 查看消息,然后必须对消息进行一些本地处理。如
我是一名优秀的程序员,十分优秀!