Apache Kafka / Editorial solution guide
A consumer position is outside retained history
Diagnose an unavailable consumer offset and choose a bounded, reconciled recovery path.
Read-only knowledge base · No public comments
Recognize the symptoms
A consumer resumes after a long interruption and reports that its requested position is outside the available range, or its configured reset policy resumes at a different position than the application expected.
Understand the likely causes
- The committed position may precede the partition’s retained start, the group or topic may differ from the intended one, or an explicit seek may request an unavailable position. Retention and reset configuration affect the available recovery choices.
Capture the exact partition and range
Preserve the client version, group identity, topic and partition, requested or committed position, available beginning and end positions, and the sanitized error. Record when each observation was made because the log continues to change. Compare the application’s actual subscription and reset configuration with the intended deployment before concluding that retention removed data. A reset can change where processing resumes, so preserve the original evidence before changing offsets or restarting repeatedly.
Assess the business interval at risk
If the requested position is older than the retained beginning, identify which business records or time interval might no longer be present. A partition offset is not a timestamp or an event count across the whole topic. Compare source-of-truth records, independent archives and destination effects where available. Compacted topics may not preserve all intermediate updates even within an apparent time range. Determine whether a snapshot can restore the required state or whether historical reconstruction requires another authorized source.
Choose and document a bounded recovery
With the data owner, select the smallest recovery path that meets the business contract: restore from an independently verified source, rebuild state from an appropriate snapshot, or explicitly accept a documented gap. Test the chosen position and destination behavior in an isolated environment first. Starting at the earliest available position cannot recover records that are already absent, and starting at the end may skip available work. Do not reset a production group merely to clear the error.
Reconcile before resuming downstream effects
Compare reconstructed business identities and destination state with the agreed recovery boundary. Verify duplicate handling for replayed records and inspect at least one subsequent partition position after controlled resumption. Retain the original range, chosen position, approval and reconciliation results in the incident record. Monitor both lag and business completeness during recovery; a low lag after a reset is not evidence that missing historical effects were restored.
Verify the fix
In an authorized disposable environment reproduce an unavailable position, apply the documented recovery choice and verify the resulting destination state against a known fixture. Confirm any unfillable gap is explicitly recorded.
Keep it from recurring
- Align retention, outage tolerance, alert thresholds and independent recovery sources with the business replay requirement. Review the client reset policy and practice recovery before the oldest required position expires.