Azure Cosmos DB Change Feed Processing with Azure Functions
Short answer
AD Use Azure Function triggers or FeedIterators with FeedRanges to process the Cosmos DB change feed for immediate, parallelized updates.
Question
The solution must meet the following requirements:
• Send insert and update operations to an Azure Blob storage account.
• Process changes to all partitions immediately.
• Allow parallelization of change processing.
You need to process the Azure Cosmos DB operations.
What are two possible ways to achieve this goal? Each correct answer presents a complete solution.
NOTE: Each correct selection is worth one point.
Key Takeaways
The question tests knowledge of Azure Cosmos DB change feed consumption models, specifically distinguishing between push-based triggers and pull-based iterators for parallel processing.
Learn how to process Azure Cosmos DB changes immediately and in parallel using the Change Feed. This page analyzes why Azure Functions and FeedIterators are the correct solutions for this scenario.
Common mistake: Learners often choose App Service or Kubernetes without recognizing that Azure Functions provide a native, optimized integration for the Cosmos DB change feed processor.
Expert Analysis
Why the Answer Is Correct
Options A and D are the correct approaches because they both leverage the Azure Cosmos DB Change Feed, which is designed to process changes to all partitions immediately. Option A uses an Azure Function trigger (push model), which automatically handles partition distribution and parallelization via the Change Feed Processor library. Option D uses the FeedIterator with FeedRange (pull model), allowing explicit control over parallelization by assigning specific physical partitions to different function instances.
Why the Other Options Are Wrong
Option B suggests using an App Service API with a 'change feed estimator,' which is not a standard SDK feature for immediate processing; estimators are typically for analytics or lag detection, not real-time event processing. Option C proposes using Azure Kubernetes Service (AKS) with the change feed feature; while technically possible to implement custom logic, it requires significant boilerplate code to handle lease management and partition distribution compared to the managed services provided by Azure Functions.
Community Comment Notes
Community consensus strongly supports options A and D. As noted by user Ja13, the Azure Function trigger automatically parallelizes processing across container partitions, satisfying the 'immediate' and 'parallel' requirements efficiently. The comments highlight that the FeedIterator approach (Option D) provides granular control over parallelization using FeedRanges, making it another complete solution.
Exam Strategy
When asked about processing Cosmos DB changes, always look for 'Change Feed' integrations. Prefer Azure Functions for managed, serverless consumption unless the scenario explicitly demands custom infrastructure like AKS.
Frequently Asked Questions
Why is Azure Function trigger better than App Service?
What is the difference between Push and Pull models here?
Discussion 1 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 1
-
Ja13 👍 1CORRECT ANSWERS A and D Option Model How it meets "all partitions + parallel + immediately" A. Functions trigger Push It uses the change feed processor behind the scenes and "automatically parallelizes change processing across your container's partitions." It runs on every change D. FeedIterator + FeedRange Pull You get "one FeedRange per physical partition" and give each one to a different function to run in parallel
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.