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.
homebrew:
brew install dhth/tap/kplaygo:
go install github.com/dhth/kplay@latestAs a binary, kplay only supports consuming JSON messages.
kplay \
-brokers='<COMMA_SEPARATED_BROKER_URLS>' \
-topic='<TOPIC>' \
-group='<CONSUMER-GROUP>'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>.protoChange the generated struct reference in ./ui/model/utils.go.
Compile, and run.
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').
- Add ability to only save records that match a chosen set of keys
kplay is built using the awesome TUI framework bubbletea.