Apache Kafka 4 · Topics
Add partitions
Increase a topic's partition count. You can't reduce it.
bin/kafka-topics.sh --alter --topic orders --partitions 6 --bootstrap-server localhost:9092
Caution: Adding partitions changes which partition a key maps to, which can break ordering per key.
Official Apache Kafka 4 documentation