You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
4. Send some test messages to the `topic-default` topic:
@@ -225,13 +225,49 @@ subcommands interactively.
225
225
topicctl reset-offsets [topic] [group] [flags]
226
226
```
227
227
228
-
The `reset-offsets` subcommand allows resetting the offsets for a consumer group in a topic. There are 2 main approaches for setting the offsets:
228
+
The `reset-offsets` subcommand allows resetting the offsets
229
+
for a consumer group in a topic.
230
+
There are a few typical approaches for setting the offsets:
229
231
230
-
1. Use a combination of `--partitions`, `--offset`, `--to-earliest` and `--to-latest` flags. `--partitions` flag specifies a list of partitions to be reset e.g. `1,2,3 ...`. If not used, the command defaults to resetting consumer group offsets for ALL of the partitions. `--offset` flag indicates the specific value that all desired consumer group partitions will be set to. If not set, it will default to -2. Finally, `--to-earliest` flag resets offsets of consumer group members to earliest offsets of partitions while `--to-latest` resets offsets of consumer group members to latest offsets of partitions. However, only one of the `--to-earliest`, `--to-latest` and `--offset` flags can be used at a time. This approach is easy to use but lacks the ability for detailed offset configuration.
232
+
1. Use `--partitions` and combine it with one of the offset operators:
233
+
`--delete`, `--offset`, `--to-earliest` or `--to-latest`.
234
+
2. Use `--partition-offset-map` to pass specific offsets per partition.
235
+
For example, `1=5,2=10` means that the consumer group offset
236
+
for partition 1 must be set to 5, and partition 2 to offset 10.
237
+
This is mainly used for replays of specific traffic,
238
+
such as when a deploy has mishandled or corrupted state,
239
+
and the prior release must be rerun
240
+
starting at a specific offset per partition.
241
+
This is the most flexible approach for offset setting.
231
242
232
-
2. Use `--partition-offset-map` flag to specify a detailed offset configuration for individual partitions. For example, `1=5,2=10,7=12,...` means that the consumer group offset for partition 1 must be set to 5, partition 2 to offset 10, partition 7 to offset 12 and so on. This approach provides greater flexibility and fine-grained control for this operation. Note that `--partition-offset-map` flag is standalone and cannot be coupled with any of the previous flags.
243
+
Note that `--partition-offset-map` flag is standalone
244
+
and cannot be coupled with other flags.
233
245
246
+
##### Partition selection flags
234
247
248
+
At most one of the following may be selected:
249
+
250
+
*`--partitions` specifies a comma-separated list of partitions IDs.
251
+
252
+
If none of these are specified,
253
+
the command defaults to selecting ALL of the partitions.
254
+
255
+
##### Offset selection flags
256
+
257
+
At most one of the following may be selected:
258
+
259
+
*`--delete` removes stored group offsets.
260
+
This will generally have the same effect as `--to-earliest` or `--to-latest`,
261
+
depending on the consumer group configuration.
262
+
However, `--delete` is more reliable and convenient,
263
+
since `--to-earliest` in particular involves a race with message retention
264
+
that may require numerous attempts.
265
+
*`--offset` indicates the specific value that all selected
266
+
consumer group partitions will be set to.
267
+
*`--to-earliest` resets group offsets to oldest still-retained per partition.
268
+
*`--to-latest` resets group offsets to newest per partitions.
269
+
270
+
If none of these are specified, `--to-earliest` will be the default.
resetOffsetSpecification:="You must choose only one of the following reset-offset specifications: --to-earliest, --to-latest, --offset."
72
-
offsetMapSpecification:="--partition-offset-map option cannot be coupled with any of the following options: --partitions, --to-earliest, --to-latest, --offset."
0 commit comments