A company runs a high-throughput transaction processing system that stores invoice documents in an Azure Cosmos DB container. To generate real-time financial reports, you are implementing a scaling consumer application with multiple active host instances. The instances must load-balance the processing of change feed events from the source container. Which configuration must you apply to the lease container and the Change Feed Processor instances to ensure correct load-balanced execution?
- AConfigure the lease container with /id as the partition key. Initialize the processor on each instance with a unique processor name to distribute the lease ownership.
- Configure the lease container with /id as the partition key. Initialize the processor across all instances with the same processor name and a unique host instance name for each instance.Answer
- CConfigure the lease container with the same partition key as the source container. Initialize the processor across all instances with the same processor name and a unique host instance name for each instance.
- DConfigure the lease container with /id as the partition key. Implement code to acquire a blob lease on the lease container prior to starting each Change Feed Processor instance.
Answer
Configure the lease container with /id as the partition key. Initialize the processor across all instances with the same processor name and a unique host instance name for each instance.
The correct option correctly identifies that the lease container must use /id as its partition key, and that the Change Feed Processor instances must share the same processor name to work as a single consumer group while using unique host instance names to distribute the lease ownership among themselves.
Step-by-Step Solution
Key Concept
Azure Cosmos DB Change Feed Processor scale-out and lease container configuration requirements