Skip to content

AxonOps — AI-Native Control Plane for Open Source Data Platforms

Kafka Offset Out of Range

This failure occurs when the requested offset is before the log start offset or after the log end offset.

Capture the exception's topic-partition and requested offset, the committed offset, current log start/end offsets, retention changes, topic recreation history, and any restore or migration operation.

Terminal window
kafka-consumer-groups.sh --bootstrap-server kafka:9092 \
--describe --group orders-consumer
kafka-get-offsets.sh --bootstrap-server kafka:9092 \
--topic orders --time earliest
kafka-get-offsets.sh --bootstrap-server kafka:9092 \
--topic orders --time latest
ChoiceConsequence
Earliest retainedReplays all data still available
LatestSkips retained backlog
TimestampStarts at the first retained record at/after a business time
Explicit offsetRequires partition-specific validation

Stop the group and preview the reset:

Terminal window
kafka-consumer-groups.sh --bootstrap-server kafka:9092 \
--group orders-consumer --topic orders \
--reset-offsets --to-earliest --dry-run

Retain the dry-run CSV or command output and obtain application-owner approval before replacing --dry-run with --execute.

Warning

An offset reset can replay side effects or skip unprocessed records. Confirm idempotency, downstream deduplication, and the accepted data-loss/replay boundary.

Restart the group, confirm its position matches the approved plan, processing and commits advance, and replayed records do not create unacceptable duplicate effects.

Set retention from maximum outage plus recovery time, monitor time lag as well as offset lag, keep consumers from remaining offline beyond retention, and validate offsets during migration/restore.