intermediate~3h

Consumer Errors, Retry & Recovery

A producer failure is your problem alone. A consumer failure can block an entire partition behind one bad record forever, if you don't design for it. This is the most consequential module on the site for production stability.

Learning objectives

  • Beginner: No custom error handler — acceptable only in a throwaway prototype, since any bad record permanently blocks its partition.
  • Intermediate: DefaultErrorHandler with exponential backoff and a Dead Letter Topic recoverer, classifying at least one known non-retryable exception type.
  • Advanced: Hybrid recovery (DLT + DB) with a RetryListener feeding metrics, combined with idempotent persistence (Module 10) so a manually replayed DLT record can never double-apply its effect.

This is a Pro chapter

Sign in, then upgrade to Pro or Power to unlock this and the full Spring Ecosystem Mastery library.

Consumer Errors, Retry & Recovery

Next Step

Continue to Consumer Timing Configurations← Back to all Kafka & Microservices chapters