nerdexam
Confluent

CCDAK · Question #37

You are sending messages with keys to a topic. To increase throughput, you decide to increase the number of partitions of the topic. Select all that apply.

The correct answer is C. New records may get written to a different partition D. Old records will stay in their partitions. 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

You are sending messages with keys to a topic. To increase throughput, you decide to increase the number of partitions of the topic. Select all that apply.

Options

  • AAll the existing records will get rebalanced among the partitions to balance load
  • BNew records with the same key will get written to the partition where old records with that key
  • CNew records may get written to a different partition
  • DOld records will stay in their partitions

How the community answered

(31 responses)
  • A
    16% (5)
  • B
    10% (3)
  • C
    74% (23)

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

#partition increase#keyed messages#data redistribution#partitioning side effects

Community Discussion

No community discussion yet for this question.

Full CCDAK Practice