The kafka cluster consists of 3 nodes.
I can create a topic and specify its patitiions by running commad:
kafka-topics.sh --zookeeper xxx --create --partitions 1 --replication-factor 3 --topic mytopic
Meanwhile, there is a parameter named nums.partitions=1
in a configuration file kafka/config/server.properties
.What is the relationship between them?
What happens when I have different combination of these two parameters under condition that they are less than/more than/equal to the number of nodes/partitions?
--partitions 1 & nums.partitions=1
--partitions 2 & nums.partitions=1
--partitions 3 & nums.partitions=1
--partitions 4 & nums.partitions=1
--partitions 1 & nums.partitions=2
--partitions 2 & nums.partitions=2
--partitions 3 & nums.partitions=2
--partitions 4 & nums.partitions=2
--partitions 1 & nums.partitions=3
--partitions 2 & nums.partitions=3
--partitions 3 & nums.partitions=3
--partitions 4 & nums.partitions=3
--partitions 1 & nums.partitions=4
--partitions 2 & nums.partitions=4
--partitions 3 & nums.partitions=4
--partitions 4 & nums.partitions=4
question from:https://stackoverflow.com/questions/66057059/what-does-partitions-parameter-mean-in-kafka