LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

kafka-topics

manages Kafka topics

TLDR

Create topic
$ kafka-topics.sh --create --topic [name] --partitions [3] --replication-factor [1] --bootstrap-server [localhost:9092]
copy
List all topics
$ kafka-topics.sh --list --bootstrap-server [localhost:9092]
copy
Describe topic
$ kafka-topics.sh --describe --topic [name] --bootstrap-server [localhost:9092]
copy
Delete topic
$ kafka-topics.sh --delete --topic [name] --bootstrap-server [localhost:9092]
copy
Alter partitions
$ kafka-topics.sh --alter --topic [name] --partitions [6] --bootstrap-server [localhost:9092]
copy

SYNOPSIS

kafka-topics.sh [options]

DESCRIPTION

kafka-topics.sh manages Kafka topics. Topics are the core abstraction for organizing messages in Kafka, with partitions for parallelism and replication for durability.

PARAMETERS

--create

Create new topic.
--list
List all topics.
--describe
Show topic details.
--delete
Delete topic.
--alter
Modify topic configuration.
--topic name
Topic name.
--partitions n
Number of partitions.
--replication-factor n
Replication factor.
--bootstrap-server servers
Kafka broker addresses.
--config key=value
Topic configuration.
--if-exists
Only if topic exists.
--if-not-exists
Only if topic doesn't exist.

TOPIC CONFIGURATIONS

$ # Set retention
--config retention.ms=86400000

# Set cleanup policy
--config cleanup.policy=compact

# Set max message size
--config max.message.bytes=1048576
copy

INSTALL

sudo pacman -S kafka
copy
brew install kafka
copy

CAVEATS

Partitions can only be increased, not decreased. Replication factor limited by broker count. Deletion may need to be enabled in config. ZooKeeper connection deprecated.

SEE ALSO

kafka(1), kafkacat(1)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid