Skip to content

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

Notifications You must be signed in to change notification settings

reiseburo/kafkakitty

Repository files navigation

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!

About

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

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published