Quick revision
The short answer
I decide by separating two questions: who owns a failed record, and which tooling helps them deal with it. Ownership stays with the consuming team whatever we build, because a central store that nobody owns is just a bigger unread pile. Then I compare a full central failure service with a lighter middle path (a standard retry and dead-letter configuration, a platform redrive tool and a catalogue built from metrics and headers) using real numbers: open failures and their age, incidents caused by ignored dead-letter topics, and the engineering cost of each option.
What to remember
In this answer, we saw that the 1,500 retry and dead-letter topics are a symptom of missing standards, missing visibility and missing ownership. A central failure service can give one inventory, consistent redrive and one place to protect personal data, but it adds a critical dependency, a sensitive data store and a team to run it, and it cannot fix ownership on its own. A middle path of standard configuration, a redrive tool and a catalogue built from metrics often delivers most of the value, and measuring open failures against clear targets tells us whether the central store is still worth building.
Your turn
Answer it aloud as you would in the interview, or type your answer below. Then show one part at a time and compare.
I decide by separating two questions: who owns a failed record, and which tooling helps them deal with it. Ownership stays with the consuming team whatever we build, because a central store that nobody owns is just a bigger unread pile. Then I compare a full central failure service with a lighter middle path (a standard retry and dead-letter configuration, a platform redrive tool and a catalogue built from metrics and headers) using real numbers: open failures and their age, incidents caused by ignored dead-letter topics, and the engineering cost of each option.
Why this question is asked
With 300 consumer groups each creating their own retry and dead-letter topics, the company has quietly built 1,500 small places where failed records go to be forgotten. Some of those records hold personal data, which turns a technical mess into a compliance risk. A central failure service sounds like the obvious cure, and that is exactly why the question is asked at this level: the interviewer wants to see whether we can tell a tooling problem from an ownership problem, weigh a new platform honestly, and decide with evidence rather than enthusiasm. In this answer, we will recap how non-blocking retries create these topics, look at what really went wrong, weigh the central service against a middle path, and finish with how to make the decision measurable.
1A Quick Recap of Non-Blocking Retries
When a Kafka listener fails to process a record, it has two broad choices. It can retry in place, which blocks the partition: every record behind the failing one waits. Or it can move the failing record somewhere else and carry on. Spring Kafka's non-blocking retries, configured with @RetryableTopic or RetryTopicConfigurationSupport, do the second. The record is republished to a retry topic such as orders-retry-0 with a delay header, a consumer on that topic tries it again later, and after the last attempt it lands in a dead-letter topic, orders-dlt.
A dead-letter topic, or DLT, is simply a Kafka topic that holds records a consumer gave up on. Spring adds headers that explain the failure: the original topic, partition and offset, the exception class and message, and a timestamp. Each consumer group that uses the feature gets its own set of topics, so 300 groups with a few retry tiers each easily reach 1,500 topics.
Notice what the feature does not do. It moves the record and records why, but it does not tell anyone, assign an owner, decide how long the record should be kept, or provide a way to send it back once the bug is fixed. Those parts were left to each team, and most teams left them undone.
2Diagnosing What Actually Went Wrong
Before choosing a solution, it helps to name the real problems, because they are not all the same kind. The inconsistent names, retention settings and access rules are a standards problem: every team configured the feature differently. The personal data in dead-letter records is a data protection problem: copies of customer data sit in topics with unknown retention and broad read access. And the fact that nobody can say how many failures are open is an ownership and visibility problem: the records exist, but no person is responsible for looking at them.
The central service proposal mainly addresses visibility, and it can help with standards and data protection. It does not, by itself, solve ownership. If failures are collected into one database with a nice UI, but the consuming teams still do not look at them, we will have one large unread pile instead of 1,500 small ones. So the first principle is this: whatever we build, the team that owns the consumer owns its failures, including the decision to fix, redrive or discard each one. The platform provides tools; it does not take over the responsibility.
| Problem | Kind | What fixes it |
|---|---|---|
| 1,500 topics, inconsistent names | Standards | Shared library or configuration |
| Personal data in DLT records | Data protection | Retention, access control, expiry |
| No count of open failures | Visibility | Catalogue from metrics and headers |
| Nobody acts on failures | Ownership | Named owner, targets, review |
| Redrive is ad hoc | Tooling | Shared redrive tool with rate limits |
3What a Central Failure Service Gives and What It Costs
The benefits are real. A central service gives one inventory of open failures with their age, their consumer group and an owning team. It allows consistent redrive: sending a fixed record back to its original topic with a rate limit, so a redrive of 50,000 records does not flood the consumer, and with a version check, so we do not replay a record against a schema it no longer matches. It gives one place to protect personal data, encrypt it, restrict access and expire it after, say, 30 days. And it removes most of the 1,500 topics.
The costs are just as real. The service becomes a new critical dependency on the failure path. When a consumer fails a record and the failure service is down, the consumer still needs somewhere to put the record, so we end up keeping a local dead-letter topic as a fallback anyway. The service needs access control across every team's data, which means it holds the most sensitive mix of records in the company and must be secured accordingly. And it needs a team to build it, run it on call and evolve it, which for a service of this kind is often two or three engineers permanently.
There is also a quieter risk: moving records out of Kafka into a database breaks the natural redrive path. A record in a DLT can be replayed with ordinary Kafka tools; a record in a database needs the service's own API, and that API must handle keys, headers and serialization exactly as the original producer did.
4A Middle Path Without a New Store
Between doing nothing and building a central store sits a cheaper option that often captures most of the value. First, a standard library or shared Spring configuration that every team uses for retries. It names topics consistently, for example <group>.<topic>.retry-1 and <group>.<topic>.dlt, sets retention on DLTs to a fixed period such as 14 days, applies ACLs so only the owning team and the platform can read them, and adds an owner header to every dead-lettered record.
Second, a platform redrive tool: a command or small UI that reads a DLT, filters by exception or time range, and republishes records to the original topic at a controlled rate. Third, a catalogue built from what already exists: DLT end offsets and committed offsets give the count of unhandled records, the record timestamps give their age, and the headers give the exception. A small job can publish a dashboard per team and per consumer group without moving a single record.
This path keeps the records in Kafka, keeps each team in control, and fixes standards, visibility and data protection. It does not give a single searchable database across all failures, so the question becomes whether that missing piece is worth a new platform.
5Deciding With Numbers
To decide, I would measure the current state first. How many records sit in DLTs today, and how old are they? How many incidents in the last year were caused or prolonged by a DLT that nobody watched? How much personal data is held in DLTs, and for how long? Then I would estimate the cost of each option: the middle path might be one quarter of work for two engineers, while a central service might be two quarters to build plus ongoing operation.
Next, set targets that both options must meet, such as no DLT record older than 7 days without an owner decision, no personal data in a DLT older than 30 days, and every consumer group with a named owner. Start with the middle path, because it is cheaper and reversible, and measure against those targets for one or two quarters. If teams meet them, we have saved a platform. If the data shows that cross-team search and central redrive are still the bottleneck, we build the central service on top of the standard configuration, and it will be far easier because the inputs are already consistent.
- Measure open failures, age, incidents
- Assign an owner to every consumer group
- Roll out standard retry and DLT config
- Add redrive tool and failure catalogue
- Targets met after two quarters?YesStop; no central store neededNoBuild the central service on the standard
5 steps in order. Play them, or step through them one at a time.
Ownership and standards come first; the central store is a later, evidence-based step.
6Follow-up questions
If we do build the central service, how should consumers behave when it is down?
They should fall back to a local dead-letter topic with the standard name and configuration, and the central service should ingest from those topics when it comes back. A consumer must never block or lose a record because the failure service is unavailable. In effect the DLT becomes the durable buffer and the service becomes a reader of it, which is also a reason to consider ingesting from DLTs from the start rather than having consumers call the service directly.
How do you handle personal data in dead-letter records?
Treat a DLT like any other store of customer data. Give it a fixed retention, restrict reads with ACLs to the owning team, and for sensitive topics consider storing only a reference (the original topic, partition and offset) plus the error rather than the full payload, if the original topic keeps the record long enough. Deletion requests must reach DLTs too, which is much easier with short retention.
How do you make teams actually act on failures?
Make them visible and owned. Each team sees a dashboard of its open failures and their age, an alert fires when a record passes the agreed age without a decision, and the number appears in the team's regular operational review. Ownership without visibility is ignored, and visibility without ownership is noise; we need both.
7Conclusion
In this answer, we saw that the 1,500 retry and dead-letter topics are a symptom of missing standards, missing visibility and missing ownership. A central failure service can give one inventory, consistent redrive and one place to protect personal data, but it adds a critical dependency, a sensitive data store and a team to run it, and it cannot fix ownership on its own. A middle path of standard configuration, a redrive tool and a catalogue built from metrics often delivers most of the value, and measuring open failures against clear targets tells us whether the central store is still worth building.
Open with
I would start by separating ownership from tooling. Whatever we build, the team that owns a consumer owns its failed records, because a central database that nobody owns is just the same unread pile, only bigger.
Then, if they want more
Then I would look at what the central service really buys: one inventory of open failures with age and owner, consistent redrive with rate limits and version checks, one place to protect and expire personal data, and far fewer topics.
Against that, it is a new critical dependency on the failure path, so consumers still need a local dead-letter topic when it is down, it holds every team's sensitive data, and it needs a team to run it.
I would compare it with a middle path: a shared Spring configuration that names and configures retry and DLT topics consistently with fixed retention and ACLs, a platform redrive tool, and a catalogue built from DLT offsets, timestamps and headers, without moving records anywhere.
To decide, I would measure today's open failures and their age, incidents caused by unwatched DLTs, and the cost of each option, and set targets such as no DLT record older than seven days without an owner decision.
I would roll out the middle path first, because it is cheaper and reversible, and build the central service only if the numbers show we still need it.
About this answer
- Last updated
- 13 November 2026
- Checked
- Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the documentation below. What the checks cover
- Where the question comes from
- Written by Scrivio for practice. It is not taken from an interview.
- Official documentation
- Apache Kafka documentation
Report an issue with this answer
Copy the line below and send it to the author with what you found. It carries the address of this page.
Issue with "A proposal is to build a central failure service that collects all failed records into a...": https://scrivio-interview-library.netlify.app/spring-boot/kafka-design/928df23d7a/