Blog
How to reset Kafka consumer offsets without breaking production
Reset a Kafka consumer group's offsets safely: stop the group, preview the change with --dry-run, pick the right target, then execute and verify.
· 3 min read
Resetting a consumer group's offsets is one of the most common fixes in Apache Kafka, and one of the easiest to get wrong. Move a group back too far and it reprocesses a day of payments; move it forward and it silently skips orders. This guide walks through a reset you can explain afterwards: what to check first, how to preview the change, and how to confirm it worked.
What an offset reset actually changes
A consumer group stores one committed offset per partition: the position of the next record it will read (how partitions, groups and offsets fit together). A reset moves those committed offsets. It doesn't delete or rewrite any records, and it doesn't touch other groups reading the same topic.
Two things are easy to confuse:
auto.offset.resetis a consumer setting. It only applies when the group has no committed offset for a partition, or the committed one is out of range.- An offset reset deliberately rewrites committed offsets that already exist, for one group you choose.
Before you reset
- Write down why you're resetting and where the group should end up: a point in time, the start of the topic, or just past a bad record.
- Stop every consumer in the group. Kafka refuses a reset while the group has active members, so scale the deployment to zero or stop the service first.
- Check what the consumers do with replayed records. Reprocessing is only safe if their writes are idempotent or deduplicated downstream.
- Save the current offsets, so you can go back to them if you need to.
Preview the change with --dry-run
Kafka ships kafka-consumer-groups.sh (kafka-consumer-groups.bat on Windows). First, look at the group as it is now:
kafka-consumer-groups.sh --bootstrap-server broker:9092 \
--describe --group orders-projectorThe output lists each partition's current offset, log-end offset and lag. Keep a copy: it's your way back.
Then plan the reset with --dry-run. Nothing is written; Kafka prints the offset each partition would move to:
kafka-consumer-groups.sh --bootstrap-server broker:9092 \
--group orders-projector --topic orders \
--reset-offsets --to-datetime 2026-10-16T09:00:00.000 \
--dry-runPick the right target
--to-earliestand--to-latestmove to the start or the end of each partition. Earliest reprocesses everything still retained; latest skips everything not yet read.--to-datetime 2026-10-16T09:00:00.000moves to the first offset at or after that time, based on record timestamps.--by-duration PT2Hmoves back by a duration from now.--shift-by -500moves each partition by a fixed number of offsets, backwards or forwards.--to-offset 48212sets an exact offset, usually for a single partition named asorders:0.
Choose the scope with --topic orders, --topic orders:0,2 for specific partitions, or --all-topics for every topic the group has offsets for.
Execute, then verify
When the plan matches what you wrote down, run the same command with --execute in place of --dry-run:
kafka-consumer-groups.sh --bootstrap-server broker:9092 \
--group orders-projector --topic orders \
--reset-offsets --to-datetime 2026-10-16T09:00:00.000 \
--executeDescribe the group again before you restart the consumers. The current offsets should match the plan, and the lag should be what you expect: higher if you moved back, zero if you moved to the end. Then start the consumers and watch the lag fall as they catch up.
If Kafka says the group is still active
You'll see an error like this when any member is still connected:
Error: Assignments can only be reset if the group 'orders-projector' is inactive, but the current state is Stable.Find the consumers still running (--describe --members lists their client IDs and hosts), stop them, and wait until the group's state is Empty.
Doing it in Offvio
Offvio's Reset Offsets dialog follows the same steps. Choose where the group should move (the earliest offset, the latest, a point in time, a specific offset or a shift by N) and select Preview. You see every partition's current offset, the new one, the change and the lag after, and nothing is written until you reset.


On a connection tagged prod you type the group's name before the reset runs, a Read-only connection refuses it outright, and every reset is recorded in the local Audit Log. More on how Offvio keeps production safe.
Checklist
- Write down why, and where the group should end up.
- Stop every consumer in the group.
- Save the current offsets with
--describe. - Plan with
--dry-runand read every line. - Run it with
--execute, then describe the group again. - Restart the consumers and watch the lag.