DEV Community

Will Velida
Will Velida

Posted on

Working with the Azure Cosmos DB Change Feed using Azure Functions and C#

In this video, I explain what the Change Feed is and how you can work with it, then I go through a basic demo on how you can consume the Change Feed using Azure Functions in C#

The Change Feed in Azure Cosmos DB is a persistent record of changes to a container in the order that they occur. Essentially, the change feed will listen to a container in Azure Cosmos DB for any changes that occur, and it will then output those changes into a sorted list of documents that were changes in the order that they were modified.

Azure Functions is the simplest option to consume the change feed. As you’ll see from the demo, all you need to do is create a Function that uses a Cosmos DB Trigger and connect it to the container that we want to listen to.

Azure Cosmos DB Change Feed:
Azure Functions Cosmos DB Trigger:

If you have any questions, feel free to ask in the comment section below or feel free to reach out to me on Twitter.


Top comments (0)