Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Reset consumer offset in kafka 0.10

Tags:

apache-kafka

In 0.10 it seems we can reset the offset to a specific position with seek()

Short of writing code is there a command line util for this? It doesn't seem so, so far?

like image 921
user432024 Avatar asked Jul 07 '16 18:07

user432024


People also ask

Can we reset offset in Kafka?

Use the kafka-consumer-groups.sh to change or reset the offset. You would have to specify the topic, consumer group and use the –reset-offsets flag to change the offset.

How do I clear a consumer in Kafka?

You can delete consumer groups from Kafka instances by using the Kafka command line tool of your Kafka client. NOTE: Ensure that the client uses the same version as the Kafka instance. [root@zk-server-1 bin]# ./kafka-consumer-groups.sh --bootstrap-server 172.31.


1 Answers

I've just implemented a simple command line tool for this purpose - https://github.com/serejja/kafka-offset-mgr.

Feel free to try it out and post issues/PRs if necessary.

like image 85
serejja Avatar answered Oct 18 '22 00:10

serejja