A whimbrel-flat device’s readings must stay in order per device on Event Hubs. How should related events be kept on one ordered stream?
Select an answer to reveal the explanation.
Short Explanation
Same device, same key, same partition. Use the device id as the partition key so readings stay ordered—don’t hand-pick partition IDs as the happy path.
Full Explanation
Order per device on Event Hubs is preserved by sending related events with the same partition key (for example the device id). The key hashes to one partition, so that device’s readings share one ordered stream. That is the supported pattern for whimbrel-flat device ordering without hand-picking partition IDs as the happy path.
Sending every event to a randomly chosen partition ID in application code as the preferred approach fails guidance: direct partition ID sends are discouraged as the primary pattern and random IDs destroy per-device order.
Disabling partitions so ordering becomes global across the hub fails product reality: hubs are partitioned; you do not get a single global ordered log for the entire hub by “turning partitions off,” and global order across all devices is not what partition keys provide.
Wrapping each reading in a Service Bus session and abandoning Event Hubs fails the service choice: Service Bus sessions order messages in Service Bus; they are not the Event Hubs partition-key answer for this stream.
Exam caveat: ordering is per partition key (per partition), not across the whole hub—different devices may land on different partitions and run in parallel. Operational check: publish with device id as the partition key, consume from the hub, and verify events for one device never interleave out of order relative to that device’s sequence.