LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

kt

Kafka topic tool for produce, consume, and admin basics

TLDR

Consume from a topic
$ kt consume -topic [my-topic]
copy
Produce messages
$ echo "[hello]" | kt produce -topic [my-topic]
copy
List topics
$ kt topic -filter [my-]
copy
Print message keys/values modes
$ kt consume -topic [t] -value-as-string
copy

SYNOPSIS

kt *command* [*options*]

DESCRIPTION

kt is a lightweight Kafka CLI for producing and consuming messages, listing topics, and simple admin tasks without the full JVM kafka-console-* tool surface. Configure brokers via flags or environment variables (KT_BROKERS, etc.). Install with go install github.com/fgeller/kt/v14@latest (module path may change with major versions).

PARAMETERS

consume -topic *name*

Read messages.
produce -topic *name*
Write messages from stdin.
topic / group / admin subcommands
Metadata and group operations—see kt -h.
-brokers *list*
Bootstrap servers.

INSTALL

nix profile install nixpkgs#kt
copy

CAVEATS

Authentication modes (SASL/SSL) require matching flags/config. Large clusters need careful filters. Confirm module version when installing with Go.

SEE ALSO

RESOURCES

Copied to clipboard
Kai