Which key choice helps preserve order for all events of one order_id?
Practice this question from Quiz: Kafka Consumer Design and Reliability, with options and an explanation.
Question
Which key choice helps preserve order for all events of one order_id?
Option A — Correct answer
Use order_id as the partition key
Option B
Use a random key every time
Option C
Use no key and rely on global ordering
Option D
Use timestamp only
Explanation
Same key routes related events to the same partition.