Kafkakitty is a kafkacat-inspired utility which brings Kafka messages to your browser in real-time
Go to file
R Tyler Croy 86a1161c0f
Incorporate the rust-rdkafka branch
2019-12-02 08:17:33 -08:00
assets Remove generated assets, no longer needed in the tree 2019-11-28 12:55:29 -08:00
build Ensure that assets have the right prefix used when they're embedded in the app 2019-11-28 22:19:53 -08:00
config Tweak the webpack build process for Vue.js 2019-11-24 20:00:44 -08:00
frontend Be less dumb about JSON parsing 2019-11-28 22:03:20 -08:00
src Add the --bind option for listening on interfaces other than lo0 2019-12-02 08:17:33 -08:00
static Restructure the frontend a wee bit to allow for a reconnecting websocket 2019-11-28 12:53:10 -08:00
test/unit Import Vue.js template project 2019-11-24 19:45:07 -08:00
.babelrc Import Vue.js template project 2019-11-24 19:45:07 -08:00
.editorconfig Import Vue.js template project 2019-11-24 19:45:07 -08:00
.eslintignore Import Vue.js template project 2019-11-24 19:45:07 -08:00
.eslintrc.js Import Vue.js template project 2019-11-24 19:45:07 -08:00
.gitignore Tweak the webpack build process for Vue.js 2019-11-24 20:00:44 -08:00
.postcssrc.js Import Vue.js template project 2019-11-24 19:45:07 -08:00
Cargo.lock Incorporate the rust-rdkafka branch 2019-12-02 08:17:33 -08:00
Cargo.toml Incorporate the rust-rdkafka branch 2019-12-02 08:17:33 -08:00
README.adoc Add support for passing -X key=value arguments through into librdkafka 2019-11-30 11:38:46 -08:00
docker-compose.yml Add a simple docker-compose configuration for running Kafka locally 2019-11-24 19:38:44 -08:00
index.html Restructure the frontend a wee bit to allow for a reconnecting websocket 2019-11-28 12:53:10 -08:00
package-lock.json Bump webpack-dev-server from 2.11.5 to 3.1.11 2019-11-29 17:57:27 +00:00
package.json Bump webpack-dev-server from 2.11.5 to 3.1.11 2019-11-29 17:57:27 +00:00
screenshot.png Add a nice little screenshot 2019-11-28 22:03:11 -08:00

README.adoc

<html lang="en"> <head> </head>

kafkakitty

Kafkakitty is a kafkacat-inspired utility which brings Kafka messages to your browser in real-time.

Running

Kafkakitty uses similar arguments to kafkacat, but does not have full parity. To run against a locally running Kafka service, use the following invocation:

% kafkakitty -t my-topic

This will automatically open a browser to localhost:8000, which is where the Kafkakitty interface can be found.

Kafkakitty 😿 0.2.0
A cute little Kafka consumer

USAGE:
    kafkakitty [FLAGS] [OPTIONS] --topics <topics>...

FLAGS:
    -h, --help       Prints help information
    -n, --no-open    Disable opening a browser window automatically
    -V, --version    Prints version information

OPTIONS:
    -b, --brokers <brokers>      Broker list in kafka format [default: localhost:9092]
    -G, --group-id <group-id>    Consumer group ID for Kafka [default: kafkakitty]
    -X <settings>...             Set a librdkafka configuration property
    -t, --topics <topics>...     List of topics to follow

Configuration

For the various additional properties which can be set through the -X command-line argument, the librdkafka configuration documents the possible options.

Note

Kafkakitty does not come with any built-in security, which means that all users on the machine will be able to view the locally hosted server.

Hacking

Kafkakitty is really composed of two related parts:

  1. A Rocket-based webserver written in Rust.

  2. The GUI written in Vue.js.

Because of this it is important to have both Rust and Node installed in your development environment.

Frontend

  1. Install the Node packages with npm install

  2. Build the frontend: npm run build

In order to rapidly prototype the frontend, it can be helpful to run the backend (see below) and then spin up a dynamically reloading frontend server with npm run dev. Once the dev server is online, it should be available at localhost:8080 and should reload assets as the Vue components are changed.

Backend

It is usually best to build the backend only after building the frontend, since the backend build will include assets generated by the frontend build process.

  1. Build the Rust application with cargo build

  2. Run the backend with cargo run-t my-topic

Tip

Install the cargo-watch crate to automatically rebuild the backend when files have changed!

</html>