# Offset-reset-protection in combination with RestartSource

**URL:** <https://discuss.akka.io/t/offset-reset-protection-in-combination-with-restartsource/9848>\
**Category:** Akka Streams & Alpakka\
**Tags:** kafka\
**Created:** [June 26, 2022, 3:06pm UTC](https://discuss.akka.io/t/offset-reset-protection-in-combination-with-restartsource/9848 "2022-06-26T15:06:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ghashange](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.akka.io/ghashange/32/2895_2.png) [@ghashange](https://discuss.akka.io/u/ghashange)\
**Post date:** [June 26, 2022, 3:06pm UTC](https://discuss.akka.io/t/offset-reset-protection-in-combination-with-restartsource/9848/1 "2022-06-26T15:06:56Z")

</div>

Hi and thanks for this great library(-ies),

we use the alpakka Kafka connector in our project to consume messages from Apache Kafka and are currently investigating " unexpected consumer offset reset" as you have mentioned in [Unexpected-consumer-offset-reset](https://doc.akka.io/docs/alpakka-kafka/current/errorhandling.html#unexpected-consumer-offset-reset).

All our consumers are configured with `auto-reset: earliest` and explicit committing, but are also wrapped into RestartSources (see [Restarting the stream with a backoff stage](https://doc.akka.io/docs/alpakka-kafka/current/errorhandling.html#restarting-the-stream-with-a-backoff-stage)) causing the re-consumption of a lot of messages once an unexpected offset reset happens.

We would like to use the provided **offset-reset-protection** but are not sure if it can work within a RestartSource. Could you please elaborate if this is a valid approach here?
