IntermediatePerformance
What is the significance of num.partitions for a topic?
Reference answer
num.partitions is the broker default for the number of partitions of a topic (default 1); a topic can also be created with its own count. The partition count matters because: 1) it caps consumer parallelism, since within a consumer group a partition is consumed by one consumer. 2) It spreads load, because the partitions of a topic can be hosted on different brokers. 3) Ordering is guaranteed only within a single partition. 4) Each partition adds overhead, such as its own log files and replication. Apache documentation gives no per-partition throughput figure, so the count is chosen by measuring your workload. You can increase the partition count later but not decrease it, and because existing records are not moved, adding partitions can change which partition a key maps to for new records.
Expected key concepts: num.partitions, partition count, consumer parallelism, ordering, overhead, within a single partition, increase, decrease, key, brokers
How did that feel?
Your own verdict, not the score. It shows up next to this question in the list, so you can come back to the shaky ones.