0Pricing
Advanced Spring Boot 4: Event-Driven Architecture (Kafka) · Lesson

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

  1. Handling Consumer Exceptions
  2. Retry Mechanisms with Spring Retry
  3. Implementing Dead Letter Topics (DLT)
  4. Non-Blocking Retries with Retry Topics
← Back to Advanced Spring Boot 4: Event-Driven Architecture (Kafka)