Join us at MongoDB.local London on 7 May to unlock new possibilities for your data. Use WEB50 to save 50%.
Register now >
Docs Menu
Docs Home
/ /

Reset Connector Offsets

You can manually change the position in a Apache Kafka topic partition from which a consumer group processes messages by resetting the offset. A reset typically moves the offset to an earlier position, such as the beginning of a topic, so that the connector reprocesses messages from that point forward. You can also move the offset to a later position to skip messages.

The MongoDB Kafka source connector provides a way to reset offsets by using the offset.partition.name configuration property. To learn more, see Reset Stored Offsets.

MongoDB does not support resetting offsets for the MongoDB Kafka sink connector. However, you can reset the offsets of the consumer group associated with your sink connector by using the Apache Kafka consumer group tool.

To learn more, see the Kafka consumer group tool page in the Confluent documentation.

Before you reset your MongoDB Kafka source connector or MongoDB Kafka sink connector offsets, consider the following:

  • Resetting offsets can result in data inconsistency or data loss, as messages can be skipped or reprocessed. Use this procedure carefully.

  • The commands in this procedure operate on Apache Kafka only, not on your MongoDB deployment. Required steps may vary between providers and configurations. Review your Kafka provider's documentation and confirm with your provider or administrator that this procedure is appropriate for your environment.

Back

Invalid Resume Token

On this page