An energy management company is deploying a distributed system to monitor smart meter readings. Telemetry data is streamed to an Azure Event Hub, and you must build a C# subscriber application using the Azure.Messaging.EventHubs SDK to process the data in parallel across multiple virtual machine instances. The application must ensure that partitions are balanced dynamically among the running instances and that event processing resumes from the last known checkpoint in the event of an instance failure. Which of the following actions are required to implement the event consumer using the EventProcessorClient class? Select two.
- Initialize a BlobContainerClient that points to an Azure Blob Storage container, and pass it to the constructor of EventProcessorClient.Cevap
- Assign event handlers to the ProcessEventAsync and ProcessErrorAsync events on the EventProcessorClient instance before starting execution.Cevap
- CUtilize the BlobLeaseClient class in the application code to manually acquire, renew, and release leases on the partition checkpoint blobs.
- DConfigure the application to authenticate using a system-assigned managed identity that is shared across all virtual machines hosting the consumer.
Cevap
Initialize a BlobContainerClient pointing to the storage container and pass it to the EventProcessorClient, and register event handler delegates for both ProcessEventAsync and ProcessErrorAsync before starting the processor.
To consume events using the EventProcessorClient class, you must provide a BlobContainerClient pointing to an Azure Blob Storage container. The client uses this container to store partition ownership and checkpoint data. Additionally, before calling StartProcessingAsync, you must register event handler delegates for both ProcessEventAsync (to process events) and ProcessErrorAsync (to handle errors) as they are mandatory for the processor to function.
Adım Adım Çözüm
Anahtar Kavram
Configuring the EventProcessorClient lifecycle with Blob Storage checkpointing and event handlers.