---
title: "Kafka OFFSET_OUT_OF_RANGE with auto.offset.reset=none"
description: "Retention deletes offsets 0-2 while a group is offline. Its Kafka fetch from offset 0 is then out of range, and with auto.offset.reset=none the group is stuck."
url: https://monedula.dev/kafka-simulator/scenarios/offset-out-of-range/
---

# Kafka OFFSET_OUT_OF_RANGE with auto.offset.reset=none

Scenario 05.1.3 · Offset out of range. Storage · Intermediate · about 2 min · Apache Kafka 4.3.

Retention deletes the prefix while a group is offline; auto.offset.reset=none leaves it stuck.

Run it: https://monedula.dev/kafka-simulator/playground/?scenario=05.1.3

## What you start with

While a consumer group is offline, retention can delete the very prefix it was about to read. On rejoining, its committed offset now points before logStartOffset - an OFFSET_OUT_OF_RANGE condition. With auto.offset.reset=none the consumer has no recovery policy, so it stalls instead of jumping.

## Step by step

1. **Group offline · auto.offset.reset=none** (t+0.000s): The consumer in group c1 has crashed (its member is offline) and its recovery policy is set to auto.offset.reset=none. Its committed position is offset 0. Press play. [Open at this step](https://monedula.dev/kafka-simulator/playground/?scenario=05.1.3&t=0)
2. **Retention deleted the prefix** (t+1.000s): Three records were produced (HW=3), then retention advanced the partition's logStartOffset to 3 - offsets 0-2 are gone. The group is still offline at position 0, now below the log start. [Open at this step](https://monedula.dev/kafka-simulator/playground/?scenario=05.1.3&t=1)
3. **OFFSET_OUT_OF_RANGE · group stuck** (t+2.200s): The group restarted and polled from offset 0, but the log now starts at 3. The broker answers OFFSET_OUT_OF_RANGE, and with auto.offset.reset=none the consumer has no fallback, so poll() throws OffsetOutOfRangeException and the group is stuck. Set auto.offset.reset to earliest or latest to recover. [Open at this step](https://monedula.dev/kafka-simulator/playground/?scenario=05.1.3&t=2)

## The takeaway

auto.offset.reset decides what happens when a committed offset no longer exists - none turns an out-of-range position into a hard stop rather than resetting to earliest or latest.

## Configs in this scenario

- [`auto.offset.reset`](https://kafka.apache.org/43/configuration/consumer-configs/#consumerconfigs_auto.offset.reset): Where a consumer starts when its group has no committed offset or the offset no longer exists: latest (the default), earliest, by_duration (a time back from now, such as by_duration:PT1H), or none to throw an exception instead. [How auto.offset.reset works](https://monedula.dev/kafka-simulator/configs/auto-offset-reset/)

## Further reading

- [Apache Kafka documentation](https://kafka.apache.org/43/configuration/consumer-configs/#consumerconfigs_auto.offset.reset)

## Troubleshooting

- [OffsetOutOfRangeException in Kafka: causes and fixes](https://monedula.dev/kafka-simulator/troubleshooting/offset-out-of-range/)
