You are ingesting telemetry from 1 million IoT devices using Azure Event Hubs. You need to ensure that all telemetry from the same device is always processed by the same consumer in order. How should you configure Event Hubs?

Direct Answer (Verified)Reviewed by Sunny (Senior Cloud Engineer)

Correct Answer: Set the device ID as the partition key when sending events

Event Hubs guarantees ordering within a partition. By using the device ID as the partition key, all events from a specific device are routed to the same partition. A consumer readi...

๐Ÿ“‹Part of Microsoft Certified: Azure IoT Developer Specialty (AZ-220) ยท Azure Certification Practice
Real Exam ScenarioAzure Event Hubs

You are ingesting telemetry from 1 million IoT devices using Azure Event Hubs. You need to ensure that all telemetry from the same device is always processed by the same consumer in order. How should you configure Event Hubs?

โœ“ Correct Answer & ExplanationAzure Event Hubs

Correct Answer

Set the device ID as the partition key when sending events

Why This Answer Is Correct

Event Hubs guarantees ordering within a partition. By using the device ID as the partition key, all events from a specific device are routed to the same partition. A consumer reading that partition sees all device events in order. This is the standard pattern for per-device ordering at massive scale.

๐Ÿ“š What This Question Tests

This question evaluates your knowledge of Azure Event Hubs โ€” a core concept tested in Microsoft Certified: Azure IoT Developer Specialty (AZ-220). Understanding Azure Event Hubs is essential for designing scalable, secure, and cost-effective cloud architectures. Mastery of this topic will help you answer scenario-based questions confidently on exam day.