A Kafka CLI porcelain for Emacs, inspired by Magit.
Starting a local kafka-broker, zookeeper, and console consumer/producer in emacs comint modes.
Using magit-popup to play around kafka-topics, consumer-groups CLI commands.
Magit popup can also be installed through Melpa
Clone the repository and append the following in your ~/.emacs
```
(add-to-list "/path/to/emacs-kafka")
(require 'kafka-cli)
```
Replace /path/to/ with the location where you cloned it.
- Customize the variables
- kafka-cli-bin-path
- kafka-cli-config-path
(setq kafka-cli-bin-path "/path/to/kafka-0.10/bin")
(setq kafka-cli-config-path "/path/to/kafka-0.10/config")
By default kafka and zookeeper url points to localhost, to configure that
(setq kafka-url "hostname:port")
(setq zookeeper-url "hostname:port")
-
M-x run-zookeeper RET Should start the zookeeper service in
localhost:2181
-
M-x run-kafkabroker RET Should start a local broker running in
localhost:9092
Configure what topics to consume
(setq kafka-consumer-whitelist-topics "path.path.topic")
- M-x run-kafkaconsumer RET Should start a console consumer You can run M-x list-processes RET, to see if these processes are running.
- M-x kafka-cli RET, Gives a popup with different options dealing with topics.
- Supports listing, deleting, adding, editing, describing topics.
- Supports overview of kafka, zk, consumer processes in a custom mode.