Bird
0
0

If a Kafka producer sends messages with different keys to a topic with 3 partitions, what can be said about the order of messages across the entire topic?

medium📝 Predict Output Q5 of 15
Kafka - Topics and Partitions
If a Kafka producer sends messages with different keys to a topic with 3 partitions, what can be said about the order of messages across the entire topic?
AMessages with different keys are merged in order automatically.
BOrder is guaranteed across all partitions.
COrder is guaranteed only within each partition, not across partitions.
DMessages are delivered in reverse order across partitions.
Step-by-Step Solution
Solution:
  1. Step 1: Understand partition ordering scope

    Kafka guarantees order only within each partition, not across partitions.
  2. Step 2: Different keys go to different partitions

    Messages with different keys may be assigned to different partitions, so global order is not guaranteed.
  3. Final Answer:

    Order is guaranteed only within each partition, not across partitions. -> Option C
  4. Quick Check:

    Order guarantee scope = A [OK]
Quick Trick: Order guaranteed per partition, not globally [OK]
Common Mistakes:
  • Assuming global order across partitions
  • Thinking Kafka merges messages automatically
  • Believing reverse order delivery

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes