Skip to content
/ kplay Public

Inspect messages in a Kafka topic in a simple and deliberate manner

License

Notifications You must be signed in to change notification settings

dhth/kplay

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kplay

✨ Overview

kplay lets you inspect messages in a Kafka topic in a simple and deliberate manner. Using it, you can pull one or more records on demand, peruse through them in a list, and, if needed, persist them to your local filesystem.

Usage

Install

homebrew:

brew install dhth/tap/kplay

go:

go install github.com/dhth/kplay@latest

⚡️ Usage

Consuming JSON messages

As a binary, kplay only supports consuming JSON messages.

kplay \
    -brokers='<COMMA_SEPARATED_BROKER_URLS>' \
    -topic='<TOPIC>' \
    -group='<CONSUMER-GROUP>'

Consuming protobuf messages

Protobuf messages can be consumed, but that will need some tweaks to the source code.

Place your protobuf files under ./proto. Using the protoc compiler, run:

protoc --go_out=. proto/<YOUR_PROTOBUF_FILE>.proto

Change the generated struct reference in ./ui/model/utils.go.

Compile, and run.

Authentication

By default, kplay operates under the assumption that brokers do not authenticate requests. Besides this, it also supports AWS IAM authentication (turned on via -auth='msk_iam_auth').

TODO

  • Add ability to only save records that match a chosen set of keys

Acknowledgements

kplay is built using the awesome TUI framework bubbletea.

About

Inspect messages in a Kafka topic in a simple and deliberate manner

Topics

Resources

License

Stars

Watchers

Forks

Languages