# Connector offset reset if connector version change

**URL:** <https://forum.confluent.io/t/connector-offset-reset-if-connector-version-change/5391>\
**Category:** Kafka Connect\
**Created:** [27 June 2022 04:35 UTC](https://forum.confluent.io/t/connector-offset-reset-if-connector-version-change/5391 "2022-06-27T04:35:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![carfield](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/carfield/32/1398_2.png) [@carfield](https://forum.confluent.io/u/carfield)\
**Post date:** [27 June 2022 04:35 UTC](https://forum.confluent.io/t/connector-offset-reset-if-connector-version-change/5391/1 "2022-06-27T04:35:16Z")

</div>

Hi, I find that if we update the version of the connector, then offset will be reset and we will need to initialize it again, not sure if there are way to keep offset available for difference version of connector? We only store a sequence number there and there is not version difference

---

<div class="post-metadata">

**Author:** ![OneCricketeer](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/onecricketeer/32/1551_2.png) [@OneCricketeer](https://forum.confluent.io/u/OneCricketeer)\
**Post date:** [28 June 2022 12:59 UTC](https://forum.confluent.io/t/connector-offset-reset-if-connector-version-change/5391/2 "2022-06-28T12:59:22Z")

</div>

Source connector or sink connector?

Version of the workers or of individual connector? Which connector?

* * *

If it’s a sink connector, it’s just a consumer, so check if it’s committing offsets.

For source connectors, it’s possible there’s logic within the connector itself that checks versions into the offset store (the topic you defined in the workers), and it can decide to do whatever with that information.

If you change the offset config topic, then yes, all sources will get reset.

---

<div class="post-metadata">

**Author:** ![carfield](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/carfield/32/1398_2.png) [@carfield](https://forum.confluent.io/u/carfield)\
**Post date:** [28 June 2022 14:03 UTC](https://forum.confluent.io/t/connector-offset-reset-if-connector-version-change/5391/3 "2022-06-28T14:03:07Z")

</div>

Thanks a lot, it is a source connector. The offset should have committed as I can see the offset content at the offset topic, also normal restart is able to retrieve the offset. However, if make changes to my code and make a new version of the plugin jar, the offset content is failed to retrieve when the connector starts up.

The connector is an in-house development, I don’t see any logic that checks the version into the offset store, not sure if there is some logic from the plugin architecture that prevents offset from getting retrieved if the jar file is updated?

---

<div class="post-metadata">

**Author:** ![OneCricketeer](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/onecricketeer/32/1551_2.png) [@OneCricketeer](https://forum.confluent.io/u/OneCricketeer)\
**Post date:** [18 July 2022 19:25 UTC](https://forum.confluent.io/t/connector-offset-reset-if-connector-version-change/5391/4 "2022-07-18T19:25:25Z")

</div>

I personally haven’t developed a source connector, but I cannot think of a reason that offsets would be modified on code changes.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex019/uploads/confluentcommunity/original/1X/c49438c90c9df282e9996fdf6971be890c71b65a.svg) [@system](https://forum.confluent.io/u/system)\
**Post date:** [17 August 2022 19:25 UTC](https://forum.confluent.io/t/connector-offset-reset-if-connector-version-change/5391/5 "2022-08-17T19:25:32Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
