Question

Difficulty: EasyProcess Azure Cosmos DB Change Feed Notifications

You are developing a cloud-native solution using the Azure Cosmos DB .NET SDK v3. You need to implement the Change Feed Processor to process changes from a product catalog container in real-time.

Which two of the following resources must you reference or configure to initialize and run the Change Feed Processor?

  1. The monitored container, which contains the source data from which the change feed is generated.Answer
  2. The lease container, which stores the state of the feed and coordinates partition processing across multiple host instances.Answer
  3. C
    A lease container that is partitioned by a low-cardinality property, such as '/status', to store the change feed state.
  4. D
    An Azure Blob Storage container with active blob leases to coordinate processing tasks between host instances.

Answer

The monitored container containing the source data, and the lease container storing state and coordinating partition processing.
The Change Feed Processor requires two Cosmos DB containers: the monitored container (which contains the source data) and the lease container (which coordinates the work and stores state). The lease container must be partitioned by '/id'.

Step-by-Step Solution

1
Identify the source container containing the documents to be monitored.
This is the monitored container.
The change feed processor monitors this container for any changes (inserts or updates).
2
Identify the container used to maintain state and coordinate distribution of work.
This is the lease container.
The lease container manages lease state per partition and coordinates distribution of workload across multiple hosts.

Key Concept

Required containers for Cosmos DB Change Feed Processor setup
Rate this question