Why this matters
- VaultCommerce routes failed inventory messages to
vaultcommerce.orders.placed.v1.DLTafter 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
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.