Non-Blocking Retries with Retry Topics
Learn to use Spring Kafka's @RetryableTopic to perform non-blocking, time-delayed retries that keep your consumer responsive while reprocessing failed messages.
The Problem with Blocking Retries
Blocking retries (Spring Retry) pause the consumer thread between attempts. A long backoff blocks the partition, stalling all later records.
Non-blocking retries solve this by moving failed records to dedicated retry topics.
How Retry Topics Work
When processing fails, the record is forwarded to a retry topic with a delay. A separate listener consumes the retry topic after the delay and tries again.
- The main consumer keeps moving forward.
- Each retry level can have a longer delay.
All lessons in this course
- Handling Consumer Exceptions
- Retry Mechanisms with Spring Retry
- Implementing Dead Letter Topics (DLT)
- Non-Blocking Retries with Retry Topics