Group offsets are stored in Kafka itself, which is why they survive a broker restart.
kafka-console-consumer.sh --bootstrap-server localhost:9092 \
--topic __consumer_offsets \
--formatter 'kafka.coordinator.group.GroupMetadataManager$OffsetsMessageFormatter' \
--from-beginning
[orders-service,orders,0]::OffsetAndMetadata(offset=182034, ...)
Compaction keeps only the latest offset per group and partition.
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