birdayz / kaf

Modern CLI for Apache Kafka, written in Go.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add ability to reset consumer group offsets

aliellis opened this issue · comments

Hey there! First of all, thanks for the great project, the kubectl syntax is a stroke of genius, makes it really friendly to use and stand out compared to the other tools out there.

I was wondering if there was any demand for adding the ability to reset consumer group offsets? Some other admin-related tools offer this ability, notably kowl and I think it would provide a lot of value to the project.

I'm happy to own this as I require this functionality, just want to run it past y'all before commencing work :)

I think it's already there: kaf group commit

Ah ha yep, just found it, from local testing it actually allows you to rest it for consumer groups with running consumers 😬

Would anyone mind if I raise an MR to:

  • add some extra docs around the cmd (there's nothing in the usage section or examples so had to dig to find it)
  • add a check when resetting the offset to see if there are any consumers running in the group before allowing it to be changed?

These are great additions, also the additional check. currently it displays "wrong type of group" or something. I'm happy to accept a PR if you're interested!

Awesome! I'm just polishing off the work now :)

I haven't managed to run the tests locally yet, is there any documentation/advice regarding it? When i run go test ./... I just get the following non-descriptive error, i can see you're using gnomock which im not overly familiar with, any pointers would be greatly appreciated!

exit status 1
FAIL    github.com/birdayz/kaf/cmd/kaf  1.909s
?       github.com/birdayz/kaf/pkg/avro [no test files]
?       github.com/birdayz/kaf/pkg/config       [no test files]
?       github.com/birdayz/kaf/pkg/proto        [no test files]
?       github.com/birdayz/kaf/pkg/streams      [no test files]
FAIL