StudyToCert

All certifications / AI-200 / Lessons

Microsoft Certified: Azure AI Cloud Developer Associate AI-200 (replaced AZ-204) · Domain 2: Develop AI solutions by using Azure data management services

Change feed: change feed processor with a lease container, Azure Functions Cosmos DB trigger, latest-version mode vs all versions and deletes

▶ Watch the overview video

Last reviewed October 6, 2026 · Leer en español

Explain it simpler

The change feed is a running list of what changed in a Cosmos DB container, like a security camera recording every time someone adds or edits a document. Instead of repeatedly asking 'anything new?', your code just watches the recording from where it last stopped. A helper, often an Azure Function, does the watching for you and keeps a bookmark in a separate container called the lease container, so it never loses its place. By default, the recording shows only the newest version of each document and does not show deletions, so people usually mark a document as deleted instead of removing it right away. A special mode can record deletions too, but it needs extra backup settings turned on.

Aisha maintains the internal knowledge assistant at Cedar Valley Health, a fictional clinic network. A nurse files a ticket: the assistant keeps quoting a medication guideline that was deleted from the knowledge base last week. Aisha checks the Azure Function that keeps the vector index in sync. It fires reliably whenever an article is created or edited, and the logs show it never once saw the deletion. A second function her colleague added for audit logging also seems to be missing about half the edits. Nothing is crashing, yet the system is quietly wrong. What is the change feed not telling these functions, and why?

The change feed is a persistent, ordered record of changes to items in a Cosmos DB container. Instead of polling with queries such as 'give me everything modified since 10:05', your code reads what changed since it last looked, and Cosmos DB keeps track of the position for you. It is the backbone of event-driven patterns in this domain: updating a search or vector index when documents change, generating embeddings for new items, keeping a cache or a materialized view in sync, replicating data to another container, or triggering downstream workflows. One property matters for correctness: changes are ordered within each partition key value, but not across partitions, so do not assume a global order.

Free account

Keep reading for free

Create a free StudyToCert account to read the rest of this lesson: 8 more sections, 6 key terms, a real-world example, an exam tip and self-check questions. Every lesson, lab and practice test is free with an account.

Sign up free Log in

Study AI-200 for free
A week-by-week plan with every lesson, quizzes, checkpoint tests, a practice exam and hands-on labs.
Open the AI-200 study plan