How do you ensure all events for a given device are processed in order?
- A Use a single partition for the whole hub
- B Set the partition key to the device id so those events land in the same partition (correct answer)
- C Enable sessions
- 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.