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?
2
Answers
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
Eventgrid
will retry if and only if the failure is not because of aconfiguration error which intrinsically cannot be solved by the retry.
You can configure retry policy by configuring two variables
Max ammount of retry
andevent time to live
. As their name suggestmaximum 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.
Reference:
Retry in event grid