I have just read an interesting article about patterns for handling errors in Kafka. The article presents four patterns for handling errors in Kafka applications:
- Stop on error
- Dead Letter Queue
- Retry topic and retry application
- Maintain order of redirected events
I have already used the spring-kafka
@RetryableTopic annotation where it handles the creation of the retry and dead letter topics automatically for Java and Kotlin backend applications. It is very useful and saves a lot of time in these scenarios.
How do you handle errors in Kafka applications? Drop you comments below about what you do in these situations.