Our order-enrichment consumer called a tax API for every record. When the tax API had a slow minute, the consumer retried each record five times with backoff inside the poll loop. One partition at a time ground to a halt, lag climbed to 400,000 records, and the healthy records behind the failing ones waited for no reason. Worse, the long retries pushed processing past max.poll.interval.ms and triggered rebalances (the loop we described in post 084).The fix was to stop retrying in place for trans...
Kafka non-blocking retries: retry topics with delays and a replayable dead-letter topic
Retrying a failed Kafka record in place blocks the whole partition. Retry topics with increasing delays keep the main flow moving, at the cost of ordering. How to design the topology, what breaks ordering, and how to build safe DLT replay tooling.
This is a paid story
Subscribe to read the full content, access all paid stories, and support the authors.
Add a label
Embed this post
<iframe src="https://www.hibug.me/kafka-non-blocking-retry-topics-dead-letter-topic" width="700" height="420" frameborder="0" loading="lazy"></iframe>
I have spent the past decade on systems where work moves through queues and events: order processing, notifications, payment flows and the services around them. I have helped split a monolith into services and, a few years later, helped merge some of them back. Distributed systems fail in ways that are hard to see from one log file. A poison message that blocks a queue for hours, a consumer that hoards messages, a schema change that silently drops events, a compensation step that ran twice, updates lost because two clocks disagreed. My posts trace each failure across the services involved, explain the guarantee we assumed and did not have, and show the design change that fixed it. For the bigger topics like sagas, CAP and service boundaries, I stay with concrete examples from systems I worked on rather than diagrams alone.
Related Stories
Kafka 4 removed ZooKeeper: migrating to KRaft through the 3.9 bridge release
Kafka consumer offline past retention: data deleted and auto.offset.reset skipped the rest
Comments
0No comments yet. Be the first to comment!
Sign In to post a comment.