skip to Main Content

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


  1. Chosen as BEST ANSWER

    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 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

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search