azureazure-eventgridazure-web-pubsub

dead lettering in Azure event grid does not work


As per the Microsoft documentation, Event Grid does not implement retry on specific errors like 400, 413, 401. In such cases Event Grid will either perform dead-lettering on the event or drop the event if dead-letter isn't configured.

So I enabled dead letter on my webhook (receiver endpoint) and produced a 400 error. But it is still not captured in dead letter logs container. Is there something I am missing?


Solution

  • Please have a look at the Event Grid message delivery and retry - Dead-letter events documentation and see if your configuration is correct.

    By default, Event Grid doesn't turn on dead-lettering. To enable it, you must specify a storage account to hold undelivered events when creating the event subscription. You pull events from this storage account to resolve deliveries.

    [...]

    Before setting the dead-letter location, you must have a storage account with a container. You provide the endpoint for this container when creating the event subscription. The endpoint is in the format of: /subscriptions/<subscription-id>/resourceGroups/<resource-group-name>/providers/Microsoft.Storage/storageAccounts/<storage-name>/blobServices/default/containers/<container-name>

    Also, take into account that

    There's a five-minute delay between the last attempt to deliver an event and when it's delivered to the dead-letter location. This delay is intended to reduce the number of Blob storage operations. If the dead-letter location is unavailable for four hours, the event is dropped.