Skip to content

Commit

Permalink
Merge pull request #143 from jvansanten/document-pr-141
Browse files Browse the repository at this point in the history
Document -reset time option in group --help
  • Loading branch information
fgeller committed Sep 11, 2023
2 parents 5b7390c + 5a11a3f commit 0588291
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions group.go
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ func (cmd *groupCmd) parseFlags(as []string) groupArgs {
flags.StringVar(&args.group, "group", "", "Consumer group name.")
flags.StringVar(&args.filterGroups, "filter-groups", "", "Regex to filter groups.")
flags.StringVar(&args.filterTopics, "filter-topics", "", "Regex to filter topics.")
flags.StringVar(&args.reset, "reset", "", "Target offset to reset for consumer group (newest, oldest, or specific offset)")
flags.StringVar(&args.reset, "reset", "", "Target offset to reset for consumer group (\"newest\", \"oldest\", a time, or specific offset)")
flags.BoolVar(&args.verbose, "verbose", false, "More verbose logging to stderr.")
flags.BoolVar(&args.pretty, "pretty", true, "Control output pretty printing.")
flags.StringVar(&args.version, "version", "", "Kafka protocol version")
Expand Down Expand Up @@ -500,11 +500,17 @@ To filter by topic:
kt group -topic fav-topic
To reset a consumer group's offset:
To reset a consumer group's offset to a specific value on a single partition:
kt group -reset 23 -topic fav-topic -group specials -partitions 2
To reset a consumer group's offset for all partitions:
To reset a consumer group's offset to the newest currently available on all partitions:
kt group -reset newest -topic fav-topic -group specials -partitions all
To reset a consumer group's offset to the newest that was available at a specific time on all partitions:
kt group -reset "6 hours ago" -topic fav-topic -group specials -partitions all
See https://github.com/markusmobius/go-dateparser for a list of supported time formats.
`, ENV_TOPIC, ENV_BROKERS)

0 comments on commit 0588291

Please sign in to comment.