Azure Cosmos DB – Change Feed, Stored Procedures and Triggers · AZ-204: Developing Solutions for Microsoft Azure Develop for Azure Storage
A .NET service must process new and updated documents from an Azure Cosmos DB container, while allowing multiple service instances to scale out witho…
Practice question from Azure Cosmos DB – Change Feed, Stored Procedures and Triggers (AZ-204: Developing Solutions for Microsoft Azure Develop for Azure Storage), with the correct answer and a step-by-step solution.
easy · MCQ · Q-813677
A .NET service must process new and updated documents from an Azure Cosmos DB container, while allowing multiple service instances to scale out without processing the same work partition concurrently. Which design should the service use?
- A.Use the Change Feed Processor with a lease container to coordinate ownership of change feed partitions.Correct answer
- B.Create one stored procedure for each service instance and read documents in random order.
- C.Run a cross-partition SQL query repeatedly and use the document ID as the checkpoint.
- D.Register a post-trigger that continuously polls the container for changes.
Solution
The Change Feed Processor uses a lease container to coordinate partition ownership and checkpoints among multiple host instances. This enables scalable and coordinated processing of changes.
More from Azure Cosmos DB – Change Feed, Stored Procedures and Triggers
- A stored procedure in Azure Cosmos DB must insert three documents and update a fourth document as one atomic operation. What is required fo…
- An application has a Cosmos DB pre-trigger named ValidateOrder. The developer expects the trigger to run automatically whenever any client…
- A Cosmos DB container uses customerId as its partition key. A change feed consumer receives changes for customers C100 and C200. Which orde…
- An application uses the default latest-version mode of the Azure Cosmos DB change feed. It must reliably notify another system when a custo…
Practise more Develop for Azure Storage
Sign up free for adaptive practice on this chapter, with instant feedback and hints on every question.
Start practising freeFree to start · No credit card needed