@@ -94,8 +94,8 @@ Solutions
9494You can recover from an invalid resume token using one of the following
9595strategies:
9696
97- - :ref:`Temporarily Tolerate Errors <temporarily-tolerate-errors>`
98- - :ref:`Delete Stored Offsets <troubleshoot-delete -stored-offsets>`
97+ - :ref:`<temporarily-tolerate-errors>`
98+ - :ref:`<troubleshoot-reset -stored-offsets>`
9999
100100.. _temporarily-tolerate-errors:
101101
@@ -132,43 +132,60 @@ To configure your source connector to temporarily tolerate errors:
132132For more information on the ``errors.tolerance`` option, see the
133133:ref:`<source-configuration-error-handling>` page.
134134
135+ .. _troubleshoot-reset-stored-offsets:
135136.. _troubleshoot-delete-stored-offsets:
136137
137- Delete Stored Offsets
138+ Reset Stored Offsets
138139~~~~~~~~~~~~~~~~~~~~~
139140
140- You can delete your Kafka Connect offset data, which contains your resume token,
141- to allow your connector to resume processing your change stream. This strategy is
142- more complex than the preceding strategy, but does not risk tolerating errors
143- unrelated to the invalid resume token.
141+ You can reset your Kafka Connect offset data, which contains your resume token,
142+ to allow your connector to resume processing your change stream.
144143
145- .. As far as I can tell, there is not a straightforward way to tell at runtime
146- which mode you are in. The Data Engineer Persona likely knows how they
147- configured their pipeline, but if they do not know they may
148- have to attempt both choices.
144+ To reset your offset data, change the value of the
145+ ``offset.partition.name`` configuration property to a partition name that does
146+ not exist on your Kafka deployment. You can set your ``offset.partition.name``
147+ property like this:
149148
150- The steps to perform this strategy depend on whether you are running Kafka Connect
151- in distributed mode or standalone mode. Click on the tab corresponding to the
152- mode of your deployment:
149+ .. code-block:: properties
153150
154- .. tabs::
151+ offset.partition.name=<a string>
152+
153+ .. tip:: Naming your Offset Partitions
154+
155+ Consider using the following pattern to name your offset partitions:
156+
157+ .. code-block:: properties
158+
159+ offset.partition.name=<source connector name>.<monotonically increasing number>
160+
161+ This pattern provides the following benefits:
162+
163+ - Records the number of times you reset your connector
164+ - Documents to which connector an offset partition belongs
165+
166+ .. example::
167+
168+ Assume you named your source connector ``"source-values"`` and you are
169+ setting the ``offset.partition.name`` property for the first time.
170+ You would configure your connector as follows:
171+
172+ .. code-block:: properties
155173
156- .. tab:: Distributed
157- :tabid: distributed
174+ offset.partition.name=source-values.1
158175
159- #. Delete the topic specified in the ``offset.storage.topic`` property of your
160- Kafka Connect deployment. For more information on deleting topics in Apache Kafka, see the
161- `official Apache Kafka documentation <https://kafka.apache.org/081/documentation.html#basic_ops_add_topic>`__.
176+ The next time you reset your connector's offset data, configure
177+ your connector as follows:
162178
163- #. Restart your source connector and continue to process change stream events.
179+ .. code-block:: properties
164180
165- .. tab:: Standalone
166- :tabid: standalone
181+ offset.partition.name=source-values.2
167182
168- #. Delete the file referenced by the ``offset.storage.file.filename `` property of
169- your Kafka Connect deployment .
183+ To learn more about the ``offset.partition.name `` configuration property, see
184+ the :ref:`<source-configuration-error-handling>` page .
170185
171- #. Restart your source connector and continue to process change stream events.
186+ To learn about naming your connector, see the official
187+ `{+ak+} <https://kafka.apache.org/documentation/#connect_configuring>`__
188+ documentation.
172189
173190.. _invalid-resume-token-prevention:
174191
0 commit comments