You are implementing an event consumer application in C# using the Azure.Messaging.EventHubs.Processor library. The application will run on multiple virtual machine instances to process events from an Event Hub named telemetry-hub.
You need to configure the EventProcessorClient instances so that:
- The event processing load is distributed dynamically across all running virtual machine instances.
- Each partition is processed by only one active instance at any given time.
- Processing can resume from the last known state after an application restart or instance failure.
Which configuration strategy should you implement?
- Configure all instances to use the same consumer group and point them to the same Azure Blob Storage container for checkpointing and partition ownership management.Answer
- BConfigure each instance to use a unique consumer group and point them to a shared Azure Queue Storage queue to manage partition ownership.
- CConfigure all instances to use the same consumer group, but assign a different, dedicated Azure Blob Storage container to each instance for lease management.
- DConfigure each instance to use a unique consumer group and assign a dedicated system-assigned managed identity with storage permissions to prevent identity sharing conflicts.
Answer
Configure all instances to use the same consumer group and point them to the same Azure Blob Storage container for checkpointing and partition ownership management.
To distribute partition processing among multiple instances of an application (load balancing), they must all be configured to use the same consumer group. Additionally, the EventProcessorClient utilizes blobs within a single Azure Blob Storage container to establish leases (representing ownership of partitions) and record checkpoints. Using a shared container ensures instances can coordinate who owns which partition and where they can resume processing.
Step-by-Step Solution
Key Concept
EventProcessorClient partition load balancing and checkpoint coordination
Estimated Time:1m 30s