Skip to content

kaskade is a text user interface for kafka, which allows you to interact and consume topics from your terminal in style!

License

Notifications You must be signed in to change notification settings

sauljabin/kaskade

Repository files navigation

kaskade

GitHub donate Libraries.io dependency status for latest release MIT License Pypi Version Homebrew Version Docker Version Platform Python Versions

Kaskade

Kaskade is a text user interface (TUI) for Apache Kafka, built withTextual byTextualize.It includes features like:

  • Admin:
    • List topics, partitions, groups and group members.
    • Topic information like lag, replicas and records count.
    • Create, edit and delete topics.
    • Filter topics by name.
  • Consumer:
    • Json, string, integer, long, float, boolean and double deserialization.
    • Filter by key, value, header and/or partition.
    • Schema Registry support with avro.
    • Protobuf deserialization support.

Screenshots

kaskade kaskade
kaskade kaskade

Installation

Install it withbrew:

brew install kaskade

brew installation.

Install it withpipx:

pipx install kaskade

pipx installation.

Running kaskade

Admin view:

kaskade admin -b my-kafka:9092

Consumer view:

kaskade consumer -b my-kafka:9092 -t my-topic

Configuration examples

Multiple bootstrap servers:

kaskade admin -b my-kafka:9092,my-kafka:9093

Consume and deserialize:

kaskade consumer -b my-kafka:9092 -t my-topic -k json -v json

Consuming from the beginning:

kaskade consumer -b my-kafka:9092 -t my-topic -x auto.offset.reset=earliest

Schema registry simple connection and avro deserialization:

kaskade consumer -b my-kafka:9092 \
-s url=http://my-schema-registry:8081 \
-t my-topic -k avro -v avro

For more information about Schema Registry configurations go to:Confluent Schema Registry client.

SSL encryption example:

kaskade admin -b my-kafka:9092 -x security.protocol=SSL

For more information about SSL encryption and SSL authentication go to:SSL support in librdkafka.

Confluent cloud admin and consumer:

kaskade admin -b${BOOTSTRAP_SERVERS}\
-x security.protocol=SASL_SSL \
-x sasl.mechanism=PLAIN \
-x sasl.username=${CLUSTER_API_KEY}\
-x sasl.password=${CLUSTER_API_SECRET}
kaskade consumer -b${BOOTSTRAP_SERVERS}\
-x security.protocol=SASL_SSL \
-x sasl.mechanism=PLAIN \
-x sasl.username=${CLUSTER_API_KEY}\
-x sasl.password=${CLUSTER_API_SECRET}\
-s url=${SCHEMA_REGISTRY_URL}\
-s basic.auth.user.info=${SR_API_KEY}:${SR_API_SECRET}\
-t my-topic \
-k string \
-v avro

More about confluent cloud configuration at:Kafka Client Quick Start for Confluent Cloud.

Running with docker:

docker run --rm -it --network my-networtk sauljabin/kaskade:latest \
admin -b my-kafka:9092
docker run --rm -it --network my-networtk sauljabin/kaskade:latest \
consumer -b my-kafka:9092 -t my-topic

Protobuf consumer:

Installprotoccommand:

brew install protobuf

Generate aDescriptor Setfile from your.protofile:

protoc --include_imports \
--descriptor_set_out=my-descriptor.desc \
--proto_path=${PROTO_PATH}\
${PROTO_PATH}/my-proto.proto

Consume usingmy-descriptor.descfile:

kaskade consumer -b my-kafka:9092 -x auto.offset.reset=earliest \
-k string -v protobuf \
-t my-protobuf-topic \
-p descriptor=my-descriptor.desc -p value=mypackage.MyMessage

More about protobuf andFileDescriptorSetat:Protocol Buffers Documentation.

Development

For development instructions seeDEVELOPMENT.md.