You are building a C# application to process events from an Azure Event Hub. The application needs to dynamically distribute partitions among multiple running instances of the consumer and checkpoint progress using Azure Blob Storage. Which class from the Azure.Messaging.EventHubs.Processor SDK library should you use as the main client to implement this consumer?
- EventProcessorClientAnswer
- BBlobLeaseClient
- CQueueClient
- DServiceBusProcessor
Answer
Use the EventProcessorClient class from the Azure.Messaging.EventHubs.Processor library.
The EventProcessorClient class is the standard class in the Azure.Messaging.EventHubs.Processor library. It connects to an Event Hub, reads events, balances partitions dynamically among other active consumer instances, and checkpoints read positions using an Azure Blob Storage container.
Step-by-Step Solution
Key Concept
Azure Event Hubs consumer implementation with EventProcessorClient