Azure Functions - Azure 服务总线消息的块处理
Azure Functions - Block processing of Azure Service Bus messages
我有一个由 Azure 服务总线消息触发的 Azure 函数 (AF)。这些消息用于对另一个服务执行操作。我想做的是,如果服务中出现暂时性故障,那么我想暂时停止消息泵。我确实有 Polly 和一个瞬态错误策略来处理 HTTP 错误。但这允许我在收到消息后重试。我想做的是暂时停止拉取消息,然后重新启动泵。 Azure Functions 可以做到这一点吗?
您无法阻止 Azure 函数。相反,您禁用它。这意味着它将需要人工干预。有关如何禁用 Azure Functions 的文档可用 here。
我最近遇到了这种情况,并使用 App Insights -> Azure Monitor -> Azure Automation -> Disable Azure function 构建了断路器。博客中的更多详细信息:https://medium.com/@binduc/circuit-breaker-pattern-for-azure-function-678ca0f7c3b5
我有一个由 Azure 服务总线消息触发的 Azure 函数 (AF)。这些消息用于对另一个服务执行操作。我想做的是,如果服务中出现暂时性故障,那么我想暂时停止消息泵。我确实有 Polly 和一个瞬态错误策略来处理 HTTP 错误。但这允许我在收到消息后重试。我想做的是暂时停止拉取消息,然后重新启动泵。 Azure Functions 可以做到这一点吗?
您无法阻止 Azure 函数。相反,您禁用它。这意味着它将需要人工干预。有关如何禁用 Azure Functions 的文档可用 here。
我最近遇到了这种情况,并使用 App Insights -> Azure Monitor -> Azure Automation -> Disable Azure function 构建了断路器。博客中的更多详细信息:https://medium.com/@binduc/circuit-breaker-pattern-for-azure-function-678ca0f7c3b5