Scrivio Interview library
LeadershipPrincipal6 min read · updated 13 November 2026

In the past year, three incidents came from engineers resetting consumer group offsets in production by hand, once on the wrong group. Replay is also a capability teams depend on.

What policy and tooling would you put in place for offset changes and replays?

Treat an offset reset as a production change: a request naming the group, topics, partitions and target, a dry run (kafka-consumer-groups.sh --reset-offsets ... --dry-run) reviewed by a second person, and then --execute while the group has no active members. Make the safe path the easy one with a self-service replay tool that only allows resets on groups the team owns, enforced with group ACLs, shows the effect before running and records who did what, and restrict direct admin access to audited break-glass accounts. Require consumers to declare whether they are safe to replay, keep replay-from-source paths for data beyond retention, and track resets, failures and recovery time.

Why this question is asked

Three incidents in a year from hand-made offset resets, one on the wrong group, is a pattern, not bad luck. At the same time, the overview reminds us that replay is a capability teams rely on to fix bugs, so the answer cannot be 'nobody resets offsets'. Interviewers ask this leadership question to see whether we can add control without blocking a useful practice. In this answer, we will recap why offset resets are risky, then design the change process, the self-service tool, access controls, replay readiness for consumers, and the measures that tell us whether it worked.

1A Quick Recap: Why a Reset Is Risky

A consumer group's committed offsets record where it is in each partition. Resetting them, for example to a time yesterday, makes the group reprocess everything from that point; resetting forward makes it skip data. The standard tool is kafka-consumer-groups.sh, which can reset to the earliest or latest offset, a datetime, a specific offset or a shift, for one topic or all of a group's topics.

The tool is powerful and unforgiving. The group name is typed by hand, so a typo or a copied command hits the wrong group. Resetting all topics instead of one reprocesses data nobody meant to touch. And a reset that is correct for the offsets can still be harmful if the consumer sends emails or payments when it reprocesses. Our three incidents are examples of each.

2A Reset Is a Production Change

The first policy is cultural and procedural: an offset reset goes through the same kind of review as a deployment. A short request names the consumer group, the topics and partitions, the target (for example a datetime), the reason, the expected number of records, and confirmation that the consumer is safe to replay. The person running it produces a dry run, and a second person reviews it. Only then is it executed, and the group must have no active members at that moment, which the tool itself enforces.

YAML
# 1. dry run: shows the new offset per partition, changes nothing
kafka-consumer-groups.sh --bootstrap-server kafka:9092 \
--group invoice-builder --topic invoices \
--reset-offsets --to-datetime 2026-11-11T09:00:00.000 --dry-run
# TOPIC PARTITION NEW-OFFSET
# invoices 0 1840211
# invoices 1 1838730
# 2. after review, with the group stopped: same command with --execute
# (refused while the group has active members)
Step throughHow a reset reaches production
  1. Request: group, topics, target, reasonconsumer declared replay-safe?
  2. Dry run produced and attached
  3. Second person agrees?
    YesStop the groupNoFix the request
  4. Execute with no active memberstool refuses otherwise
  5. Restart group, watch lag and errorsrecord the outcome

5 steps in order. Play them, or step through them one at a time.

Notice that the dry run output is exactly what the reviewer needs: the group, the topic and the new offset per partition, which can be compared with the current offsets to see how many records will be reprocessed. A wrong group name shows up here, before anything changes.

3Make the Safe Path the Easy Path

A process that relies on shell commands will be bypassed under pressure at 3 a.m. So the platform offers a self-service replay tool, a small internal web page or CLI on top of the Kafka admin API. A team picks one of its own groups from a list rather than typing a name, chooses topics and a target time, and sees the effect before running: records to reprocess per partition, estimated time, and whether the group is currently active. The tool then stops the group through its deployment, or tells the user to, executes the reset, and records who did what, when and why in an audit log.

Ownership is enforced, not just displayed. Kafka ACLs on consumer groups, for example a team's service account having Read on groups with its prefix, mean the tool, acting on behalf of the user, can only reset groups the team owns. The wrong-group incident becomes impossible rather than unlikely.

4Restricting Direct Access

Direct admin access to the cluster, the kind that can reset any group, moves to break-glass accounts: credentials that are checked out for a limited time, with a reason, and whose use is logged and reviewed. Day-to-day work goes through the tool; the break-glass path exists for real emergencies and for the platform team itself. This is not about distrust; it removes the opportunity for a tired engineer to run a command against the wrong group.

5Replay Readiness for Consumers

Most of the damage of a wrong replay comes from consumers that are not safe to replay. So each consumer declares, in its catalogue entry, whether it is replay-safe: processing is idempotent, and side effects such as emails and payments are suppressed or idempotent by event id. The tool warns or refuses when a reset targets a group that is not marked safe. We also keep replay-from-source paths, such as a lake copy of important topics, for repairs that go beyond retention, so teams are not tempted to improvise when Kafka no longer has the data.

Controls and the incidents they prevent
ControlPrevents
Dry run reviewed by a second personwrong target, wrong topic, unexpected volume
Self-service tool with group ACLsresetting another team's group
Break-glass admin accounts with auditad-hoc commands under pressure
Replay-safe declaration per consumerrepeated emails, payments and webhooks
Lake copy and replay-from-source pathimprovised repairs beyond retention

6Measuring Whether It Worked

We track the number of resets per month, how many went through the tool versus break-glass, failed or rolled-back resets, incidents caused by resets, and the time from 'we need a replay' to 'replay finished'. The last number matters as much as the others: if the process makes replays slow, teams will route around it. A quarterly review of incidents and break-glass uses tells us which rule to tighten and which to relax.

7Follow-up questions

Is a second reviewer really needed for every reset?

For production groups, yes, at least until the tool and ACLs have proven themselves; the review takes a few minutes and the dry run makes it concrete. For non-production environments, self-service without review is fine, which also lets teams practise.

How do we get teams to adopt the tool?

By making it faster than the shell command: no need to find credentials, look up offsets or remember flags. Combined with removing broad admin credentials from everyday use, the tool becomes the obvious path rather than an imposed one.

8Conclusion

In this answer, we treated offset resets as production changes: a request, a dry run reviewed by a second person, and execution only while the group has no members. A self-service replay tool limited by group ACLs makes the safe path the easy one and keeps an audit trail, while direct admin access moves to break-glass accounts. Consumers declare whether they are replay-safe, replay-from-source paths cover data beyond retention, and we measure resets, failures and recovery time to keep the policy useful rather than obstructive.

What to say in the interviewAbout 80 seconds aloud

Open with

I would keep replay as a capability but make it a controlled one. First, an offset reset is a production change: a request naming the group, topics, partitions, target time and reason; a dry run with kafka-consumer-groups.sh reset-offsets and dry-run, reviewed by a second person, which shows the new offset per partition and makes a wrong group obvious; and then execute while the group has no active members, which the tool enforces anyway.

Then, if they want more

Second, I would make the safe path the easy path with a self-service replay tool on top of the admin API. Teams pick one of their own groups from a list, see records to reprocess and the estimated time before running, and every action is logged.

Ownership is enforced with group ACLs, so resetting another team's group simply is not possible. Direct admin access moves to break-glass accounts with time limits and audit logging. Third, consumers declare whether they are replay-safe: idempotent processing and side effects suppressed or idempotent by event id. The tool warns or refuses otherwise.

We also keep a lake copy for repairs beyond retention. Finally, I would track resets, break-glass uses, failed resets and time to recover, and review incidents each quarter, because if the process makes replays slow, people will go around 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 "What policy and tooling would you put in place for offset changes and replays?": https://scrivio-interview-library.netlify.app/spring-boot/kafka-clients-in-depth/33c999919c/