A bash script to remove messages in kafka topics by lowering the retention before upping the retention back to the default value or configured value.
- Install homebrew by running the following command:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null
- Run
brew install zookeeper
- Run
brew install kafka
- Run
brew services start zookeeper
- Run
brew services start kafka
Once messages have been added to kafka topics, one can drain all topics of all messages with the following command:
./drain-kafka-topics
otherwise it is possible to drain chosen topics with:
./drain-kafka-topics -t <topic1>,<topic2>
For more commands use the help (-h) flag, like so:
./drain-kafka-topics -h
See LICENSE for details.
See CONTRIBUTING for details.