Source: Azure Event Hubs — Connected Objects
What is Azure Event Hub?
Big data streaming platform and event ingestion service. Routes live data from publishers to consumers. Can receive and process millions of events per second. Messages can also be stored (typically to Blob Storage or Data Lake).
Partitions
Event Hub organizes event sequences into partitions (default: 2 on free tier).
Each partition is a “commit log” containing:
- Offset — position of event within partition
- Body of the event
- Sequence number
- Custom user-defined properties
- System properties (e.g., service-side timestamp)
Stream Offsets
Offset = position of event in a partition. Consumers specify an offset (timestamp or numeric value) to begin reading from.
Consumers are responsible for storing their own offset values outside of Event Hubs.
Checkpointing
Save a “checkpoint” offset to resume reading after disconnect. Stored in Blob Storage. The .NET EventHub SDK has helpers for storing/retrieving checkpoints from Blob Storage.
IoT Hub = Event Hub Instance
Azure IoT Hub’s D2C endpoints behave the same as Event Hub endpoints.
Therefore, use the Azure EventHub SDK to receive D2C messages from IoT Hub.
.NET EventHub SDK
| Class | Package | Use case |
|---|---|---|
EventProcessorClient | Azure.Messaging.EventHubs.Processor | All partitions, production (recommended) |
EventHubConsumerClient | Azure.Messaging.EventHubs | Single partition or all (less recommended) |
Connection String
Get EventHub-compatible connection string from Azure portal: IoT Hub → Built-in endpoints → Event Hub Details → Event Hub-compatible endpoint
Default consumer group: "$Default" (include double quotes).
See Also
- Azure IoT Overview topic
- Azure Blob Storage source