Need help with kafkat?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

491 Stars 83 Forks Apache License 2.0 76 Commits 16 Opened issues



Services available


Need anything else?

Contributors list

Build Status


Simplified command-line administration for Kafka brokers.


Let us know! If you fork this, or if you use it, or if it helps in anyway, we'd love to hear from you! [email protected]

License & Attributions

This project is released under the Apache License Version 2.0 (APLv2).

How to release

  • update the version number in
  • execute
    bundle exec rake release


  • Install the gem.
gem install kafkat
  • Create a new configuration file to match your deployment.
  "kafka_path": "/srv/kafka/kafka_2.10-",
  "log_path": "/mnt/kafka-logs",
  "zk_path": ",,"

Kafkat searches for this file in two places,

  • At any time, you can run
    to get a list of available commands and their arguments.
$ kafkat
kafkat 0.0.10: Simplified command-line administration for Kafka brokers
usage: kafkat [command] [options]

Here's a list of supported commands:

brokers Print available brokers from Zookeeper. clean-indexes Delete untruncated Kafka log indexes from the filesystem. controller Print the current controller. elect-leaders [topic] Begin election of the preferred leaders. partitions [topic] Print partitions by topic. partitions [topic] --under-replicated Print partitions by topic (only under-replicated). partitions [topic] --unavailable Print partitions by topic (only unavailable). reassign [topic] [--brokers ] [--replicas ] Begin reassignment of partitions. resign-rewrite Forcibly rewrite leaderships to exclude a broker. resign-rewrite --force Same as above but proceed if there are no available ISRs. set-replication-factor [topic] [--newrf ] [--brokers id[,id]] Set the replication factor of shutdown Gracefully remove leaderships from a broker (requires JMX). topics Print all topics. drain [--topic ] [--brokers ] Reassign partitions from a specific broker to other brokers.

Important Note

The gem needs read/write access to the Kafka log directory for some operations (clean indexes).

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.