Skip to main content
PreparationZone Logo
PrepZone

DLT, Retry Topics, and Poison Messages

Route poison VaultCommerce payloads to a dead-letter topic after bounded retries — never block the partition.

Pass checkpoint below

Why this matters

  • VaultCommerce routes failed inventory messages to vaultcommerce.orders.placed.v1.DLT after 3 retries with exponential backoff.
  • Poison pill (malformed Avro) would infinite-loop without DLT escape hatch.
  • DLT consumers alert on-call — human triage before replay or discard.
  • Spring Kafka DefaultErrorHandler implements this pattern natively.
At-most-once
Fire and forgetNo retry
Risk: loss
At-least-once
Retry on failureKafka default
Risk: duplicates
Exactly-once
Transactions + idempotence
Cost: complexity
At-most-once may lose messages. At-least-once may duplicate. Exactly-once needs broker and application cooperation.

Retry topic pattern

Main consumer fails → publish to topic-retry-30000 with header retry-count. Retry consumer waits 30s (or uses delay topic + separate consumer) then republishes to main topic. VaultCommerce uses Spring's FixedBackOff + DeadLetterPublishingRecoverer.

Key points

  • DLT (dead-letter topic) — quarantine for permanently failed messages
  • Retry topic — intermediate topic with delay before reattempt
  • Poison message — record that always fails processing
  • Backoff — exponential delay between retries
  • Non-blocking error handling — skip and continue partition processing

The rest of this guide is part of Pro

Free covers every fresher guide in full. Pro unlocks Senior, Staff and Architect guides across every track.

Still to come · 2 sections

  • DLT operations
  • VaultCommerce rollout checklist

Test yourself

Answer these before moving on — recall is what makes it stick.