The Lenses-CLI allows you to handle consumer group offsets. The command used for this purpose is offsets, with subcommands update-multiple-partitions or update-single-partition. Certain mandatory flags such as --group and --topic are required, indicating the consumer group ID and topic name respectively. To affect all topics use the --all-topics flag. The table below shows some additional flags used for modifying consumers offsets.
offsets
update-multiple-partitions
update-single-partition
--group
--topic
--all-topics
-g, --group
-t, --topic
--topics
--partition
--to-earliest
--to-latest
--to-offset
lenses-cli consumers \ offsets \ update-single-partition \ --group [GROUP_NAME] \ --topic [TOPIC_NAME] \ --partition [PARTITION_ID] \ --to-offset [OFFSET_ID]
lenses-cli consumers \ offsets \ update-single-partition \ --group [GROUP_NAME] \ --topic [TOPIC_NAME] \ --partition [PARTITION_ID] \ --to-earliest
lenses-cli consumers \ offsets \ update-single-partition \ --group [GROUP_NAME] \ --topic [TOPIC_NAME] \ --partition [PARTITION_ID] \ --to-latest
# The datime parameter needs to be in ISO 8601 format lenses-cli consumers \ offsets \ update-multiple-partitions \ --group [GROUP_NAME] \ --topic [TOPIC_NAME] \ --to-datetime [DATETIME]
lenses-cli consumers \ offsets \ update-multiple-partitions \ --group [GROUP_NAME] \ --topic [TOPIC_NAME] \ --to-earliest
lenses-cli consumers \ offsets \ update-multiple-partitions \ --group [GROUP_NAME] \ --topic [TOPIC_NAME] \ --to-latest
lenses-cli consumers \ offsets \ update-multiple-partitions \ --group [GROUP_NAME] \ --all-topics \ --to-latest
On this page