Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

IDScenarioArgumentsConsiderations
1.Reset to Timestamp--to-datetime YYYY-MM-DDTHH:mm:SS.sssThis option will translate the datetime to Epoch milliseconds, find the offsets by timestamp, and reset to those offsets. It will use the datetime specified plus the default timezone where the client is running (i.e. ZoneId#systemDefault)
2.Reset to Duration--to-duration  PnDTnHnMnSThis option will subtract the duration to the current timestamp in the server, and find the offsets using that subtracted timestamp, and reset to those offsets. The duration specified won't consider daylight saving effects.
3.Reset to Earliest--to-earliestThis option will reset offsets to the earliest using Kafka Consumer's `#seekToBeginning`
4.Reset to Latest--to-latestThis option will reset offsets to the earliest using Kafka Consumer's `#seekToEnd`
5.Reset to Current Position(no scenario arguments)This option won't reset the offset. It will be used to print and export current offset.
6.Reset to Offset--to-offsetThis option will reset offsets to an specific value.
7.Shift Offset by 'n'--shift-offset-by n

This option will add the `n` value to the current offset, and reset to the result. `n` can be a positive or negative value, so offset will be move backward if it is negative, and forward if it is positive.

If current offset + n is higher than the latest offset, new offset will be set to latest.

If current offset + n is lower than the earliest offset, new offset will be set to earliest.

8Reset from File--reset-from-file PATH_TO_FILEThis option will take a Reset Plan CSV file with the offsets to reset by topics/partitions.

Scopes

...

The scopes will be defined extending the existing `topic` argument, using the following format:

 

Code Block
--topic <topic-name>:<partition numbers>
ex: --topic topic1 --topic topic2:0,1,2
Topic all partitions and List of Partitions --partitions 0,1,2 only the specified
IDScopeArgumentsDescription
1.All topics--all-topicsIn this case the tool will run the scenario considering all topics that has been consumed by Consumer Group. It will consider all partitions by topic assigned.
2.List of Topics--topicstopic topic1 ,topic2...--topic topic2In this case, the tool first will validate that input topics are been consumed by Consumer Group, and then run the scenario. It will consider all partitions by topic defined.
3.Topics and List of Partitions--topic topic1:0,1,2 --topic topic2:0In this case, the tool first will validate that input topic is been consumed by Consumer Group, and then run the scenario. It will consider only the partitions specified by topic.
4.Topic--topic topic1In this case, the tool first will validate that input topic is been consumed by Consumer Group, and then run the scenario. It will consider all partitions.

Execution Options

IDOptionArgumentsDescription
1.Plan(no execution arguments)

This execution option will only print out the result of the scenario by scope.

The output will look like this:

TOPIC                 PARTITION CURRENT-OFFSET NEW-OFFSET LOG-END-OFFSET LAG CONSUMER-ID HOST CLIENT-ID
record-metadata 0 100 0 100 0 - - -
2.Execute--executeThis execution option will run the reset offset process based on scenario and scope.
3.Export--exportThis execution option will print out the reset plan in CSV format, that later could be used in the scenario 8. (i.e. as backup)

...