Azure事件网格触发功能在500上重试

发布于 2025-02-11 20:04:54 字数 257 浏览 8 评论 0 原文

我已经创建了类型的EventGridTrigger类型的Azure函数,作为Event Grid中的主题的订户。此功能使用REST客户端调用下游API。

但是,在某些情况下,下游API不是Avaialble,或者在呼叫EventGridlTrigger的下游API时有例外。在这种情况下,我观​​察到EventGridTopic仍显示事件为已交付,而不是在失败时重试。

无论如何,是否有可能在处理故障时将EventGrid重试的交付或可能在Deadletter队列中添加?

I have created Azure Function of type EventGridTrigger as subscriber to a topic in Event Grid. This function calls the downstream api using rest client.

However there could be scenarios where downstream api is not avaialble or there is exceptions while calling downstream api from EventGridLtrigger. In such case I have observed EventGridTopic is still showing Event as delivered instead of retrying on failure.

Is there anyway possible to get EventGrid to retry delivery or possibly add the event in deadletter queue when there is processing failures?

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

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

发布评论

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

评论(2

虐人心 2025-02-18 20:04:54
  • eventgrid 在且仅当失败不是因为
    配置误差本质上无法通过重试解决。

  • 您可以通过配置两个变量来配置重试策略 RETRY 实时的事件时间。顾名思义
    在删除消息之前可以进行的最大尝试
    或死了,活动时间将配置时间
    默认情况下每个重试之间是1440。

创建事件网格时可以配置重试策略。

az eventgrid event-subscription create \ 
-g gridResourceGroup \ 
--topic-name  <topic_name> \ 
--name  <event_subscription_name> \ 
--endpoint  <endpoint_URL> \
 --event-ttl  720\
 --max-delivery-attempts  18

参考:

  • Eventgrid will retry if and only if the failure is not because of a
    configuration error which intrinsically cannot be solved by the retry.

  • You can configure retry policy by configuring two variables Max ammount of retry and event time to live. As their name suggest
    maximum attempts which can be made before either droping the message
    or dead lettering it, event time to live will configure the time
    between each retry by default it is 1440.

You can configure retry policy when you create the event grid.

az eventgrid event-subscription create \ 
-g gridResourceGroup \ 
--topic-name  <topic_name> \ 
--name  <event_subscription_name> \ 
--endpoint  <endpoint_URL> \
 --event-ttl  720\
 --max-delivery-attempts  18

Reference:

Retry in event grid

鲸落 2025-02-18 20:04:54

如果在Azure EventGrid触发功能中存在内部服务器错误(状态代码500),则事件网格将根据配置重试送达。使用以下链接以获取更多详细信息。

https://github.com/azure/azure/azure-functions-eventgrid-gridgrid--扩展/问题/32

If there is internal server error (status code 500) in the Azure EventGrid Trigger function, Event Grid will retry delivery based on the configuration. Use below link for more details.

https://github.com/Azure/azure-functions-eventgrid-extension/issues/32

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