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?

  1. A.Use the Change Feed Processor with a lease container to coordinate ownership of change feed partitions.Correct answer
  2. B.Create one stored procedure for each service instance and read documents in random order.
  3. C.Run a cross-partition SQL query repeatedly and use the document ID as the checkpoint.
  4. 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

All of Azure Cosmos DB – Change Feed, Stored Procedures and Triggers

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 free

Free to start · No credit card needed