The group must have no active members, and afterwards it starts from auto.offset.reset.
kafka-consumer-groups.sh --bootstrap-server localhost:9092 \
--group orders-service --delete
# Or reset without deleting:
kafka-consumer-groups.sh --bootstrap-server localhost:9092 \
--group orders-service --topic orders \
--reset-offsets --to-earliest --execute
Error: Group orders-service is not empty.
(stop the consumers first)
Run this yourself in the Online Java Compiler, spin up a live REST API in the API Sandbox, or practise with Java interview questions.
Published 2026-08-11