Question

Difficulty: MediumImplement Azure Event Hubs Solutions

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?

  1. 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
  2. B
    Configure each instance to use a unique consumer group and point them to a shared Azure Queue Storage queue to manage partition ownership.
  3. C
    Configure all instances to use the same consumer group, but assign a different, dedicated Azure Blob Storage container to each instance for lease management.
  4. D
    Configure 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

1
Determine the consumer group configuration.
Use the same consumer group across all instances.
In Event Hubs, instances must belong to the same consumer group to distribute partitions and load balance processing among themselves.
2
Determine the checkpoint and lease storage configuration.
Use a single, shared Azure Blob Storage container.
The EventProcessorClient uses blobs in a shared container to acquire leases (representing partition ownership) and save checkpoints. Sharing the container prevents multiple instances from taking over the same partitions simultaneously.

Key Concept

EventProcessorClient partition load balancing and checkpoint coordination
Estimated Time:1m 30s
Rate this question