An article by Stas(Stanislav) Lebedenko about how to tackle exceptions and re-run failed messages. One of the Serverless solution benefits is a performance at scale. As a result, you can get ‘Failure at scale’ if something goes wrong. Thus it’s crucial to introduce error handling for your Azure Functions project early.
The purpose of the dead-letter queue (DLQ) is to hold messages that cannot be delivered to any receiver, or messages that could not be processed. Link to Azure Service Bus queues docs.
His solution relies on:
- Azure Storage Queue
- Azure Function with input trigger for IoT Hub(Event Hub) messages endpoint and output trigger to Storage Queue
- Notification alert triggered by Queue transaction count in 30 minutes
- Azure Function for a replay of the messages stored in Storage Queue
The author also provides useful info about:
- The dead letter queue or poison queue?
- Error handling via Azure Storage Queue
- Azure infrastructure and Functions
- Notification setup
Links to further reading together with screen-grabs and code examples also provided. Good read!
[Read More]