Confluent
CCDAK · Question #62
The rule "same key goes to the same partition" is true unless...
The correct answer is C. the number of partition changes. Increasing the number of partition causes new messages keys to get hashed differently, and breaks the guarantee "same keys goes to the same partition". Kafka logs are immutable and the previous messages are not re-shuffled.
Developing Kafka Producers
Question
The rule "same key goes to the same partition" is true unless...
Options
- Athe number of producer changes
- Bthe number of kafka broker changes
- Cthe number of partition changes
- Dthe replication factor changes
How the community answered
(26 responses)- B4% (1)
- C88% (23)
- D8% (2)
Explanation
Increasing the number of partition causes new messages keys to get hashed differently, and breaks the guarantee "same keys goes to the same partition". Kafka logs are immutable and the previous messages are not re-shuffled.
Topics
#partitioning#partition key#default partitioner#partition count
Community Discussion
No community discussion yet for this question.