Q24 Event Hubs Domain 3 · 20–25% of exam Priority · Real Exam

How do you ensure all events for a given device are processed in order?

  1. A Use a single partition for the whole hub
  2. B Set the partition key to the device id so those events land in the same partition (correct answer)
  3. C Enable sessions
  4. D Use Event Grid instead

Shortcut: Event Hubs hashes the partition key to select a partition. A stable key such as device id guarantees co-location and therefore ordering for that device.