Add topic partitions
Increase the partition count (you cannot decrease it)
kafka-topics.sh --bootstrap-server kafka:9092 --alter --topic my-topic --partitions 12
More kafka commands
-
kafka-configs.sh --bootstrap-server kafka:9092 --describe --entity-type topics --entity-name my-topicShow all config values that are overridden for a topic
-
kafka-configs.sh --bootstrap-server kafka:9092 --alter --entity-type topics --entity-name my-topic --add-config retention.ms=604800000Keep messages in a topic for 7 days
-
kafka-broker-api-versions.sh --bootstrap-server kafka:9092List all API versions that the broker supports
-
kafka-topics.sh --bootstrap-server kafka:9092 --listShow all Kafka topics in the cluster
-
kafka-topics.sh --bootstrap-server kafka:9092 --create --topic <name> --partitions 3 --replication-factor 2Create a topic with 3 partitions and replication factor 2