How do I define retry count and interval for Azure function?

前端 未结 1 1846
说谎
说谎 2021-01-25 17:21

I have a blob triggered Azure function. I would like to define the retry policy (count and interval) for the function to be retried if it throws an exception. Is there a way I c

相关标签:
1条回答
  • 2021-01-25 17:42

    You can control the maximum number of retries via the maxDequeueCount setting in the "queues" config section of host.json (see here). The reason "queues" config affects blob functions is because behind the scenes a control queue is used for dispatching blobs to your functions. So the settings you configure for "queues" will affect the blob triggered functions as well. E.g. the default retry count is 5 - if a blob fails processing more than that, then it is moved to the poison queue.

    You can control the time between retries via the visibilityTimeout setting.

    Note that these settings are host wide and apply to all functions. You can't control these per function currently.

    0 讨论(0)
提交回复
热议问题