5.0
Kafka consumers
Commands for updating consumer groups offsets.
Flags —group and —topic are mandatory and specify the consumer group ID and topic name respectively.
To affect all topics use the —all-topics flag.
- -g, —group - Sets the Consumer Group ID
- -t, —topic - Sets the topic name
- —all-topics - Selects implicitly all topics
- —-topic - The topic to reset offsets for
- —partition - Sets the partition ID
- —to-earliest - resets partition offset to earliest offset
- —to-latest - sets partition offset to latest offset
- —to-offset - sets partition offset to the provided value
Update a single topic’s partition offset to the specified value
lenses-cli consumers \
offsets \
update-single-partition \
--group <group_name> \
--topic <topic_name> \
--partition <partition_id> \
--to-offset <offset_id>
Update to the earliest offset available
lenses-cli consumers \
offsets \
update-single-partition \
--group <group_name> \
--topic <topic_name> \
--partition <partition_id> \
--to-earliest
Update to the latest offset available
lenses-cli consumers \
offsets \
update-single-partition \
--group <group_name> \
--topic <topic_name> \
--partition <partition_id> \
--to-latest
Update given topics for alls their partitions offsets to the specified datetime
lenses-cli consumers \
offsets \
update-multiple-partitions \
--group <group_name> \
--topic <topic_name> \
--to-datetime <datetime>
Reset given topics for all their partitions offsets to the earliest offset possible
lenses-cli consumers \
offsets \
update-multiple-partitions \
--group <group_name> \
--topic <topic_name> \
--to-earliest
Reset given topics for all their partitions offsets to the earliest offset possible
lenses-cli consumers \
offsets \
update-multiple-partitions \
--group <group_name> \
--topic <topic_name> \
--to-latest
Reset offsets for all topics of this consumer group
lenses-cli consumers \
offsets \
update-multiple-partitions \
--group <group_name> \
--all-topics \
--to-latest