wvanbergen / kazoo-go

Go library to access Kafka metadata in Zookeeper
http://godoc.org/github.com/wvanbergen/kazoo-go
MIT License
100 stars 48 forks source link

ResetOffsets doesn't delete correctly #14

Open rrh opened 8 years ago

rrh commented 8 years ago

Line 420 if consumergroup.go: You are attempting to delete version 0, which may not exist.

AFAICT (I'm no expert here), you first need to call Exists to return a stat struct for this node, extract the version number from that stat structure, and then delete that version, much as is done for the parent delete at line 425 just below that.

In addition, it would be nice if there were a path in JoinConsumerGroup (package kafka) that could optionally call ResetOffsets()