You are developing a C# transaction ingestion service that processes events from an Azure Event Hub. The service is built using the Azure.Messaging.EventHubs.Processor library and runs on multiple host instances. During performance testing, you encounter lease conflict exceptions when host instances scale up. You need to ensure that the checkpoint store is configured correctly and that partition ownership is managed properly. Which of the following describes the correct storage configuration and client behavior for implementing checkpointing with the EventProcessorClient?
- AUse Azure Blob Storage as the checkpoint store, and manually implement custom lease acquisition and renewal logic using the BlobLeaseClient class within the event handler.
- BUse Azure Queue Storage as the checkpoint store, allowing the EventProcessorClient to use queue message visibility timeouts to hold partition leases.
- Use Azure Blob Storage as the checkpoint store, allowing the EventProcessorClient to automatically manage partition ownership by creating and acquiring leases on metadata blobs.Cevap
- DUse Azure Service Bus Queues as the checkpoint store, relying on the ServiceBusSessionProcessor to automatically renew session-based partition locks.
Cevap
Use Azure Blob Storage as the checkpoint store, allowing the EventProcessorClient to automatically manage partition ownership by creating and acquiring leases on metadata blobs.
The correct answer represents the native behavior of the EventProcessorClient. When provided with a BlobContainerClient, the processor client manages partition load balancing and checkpoints internally by creating metadata blobs inside the blob container and acquiring leases on them. There is no need for developers to manually manage these leases.
Adım Adım Çözüm
Anahtar Kavram
Partition checkpointing and load balancing automation in Azure Event Hubs using Azure Blob Storage leases.