kafkacat

kafkacat

TLDR

Consume messages starting with the newest offset

>_ kafkacat -C -t [topic] -b [brokers]
copy

Consume messages starting with the oldest offset and exit after the last message is received

>_ kafkacat -C -t [topic] -b [brokers] -o beginning -e
copy

Consume messages as a Kafka consumer group

>_ kafkacat -G [group_id] [topic] -b [brokers]
copy

Publish message by reading from stdin

>_ echo [message] | kafkacat -P -t [topic] -b [brokers]
copy

Publish messages by reading from a file

>_ kafkacat -P -t [topic] -b [brokers] [path/to/file]
copy

List metadata for all topics and brokers

>_ kafkacat -L -b [brokers]
copy

List metadata for a specific topic

>_ kafkacat -L -t [topic] -b [brokers]
copy

Get offset for a topic/partition for a specific point in time

>_ kafkacat -Q -t [topic]:[partition]:[unix_timestamp] -b [brokers]
copy

Copied to clipboard
free 100$ digital ocean credit