DEV Community

loading...

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

Will Velida
Microsoft Data Platform MVP. Software Engineer using .NET to build awesome things in Azure!
・1 min read

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: https://docs.microsoft.com/en-us/azur...
Azure Functions Cosmos DB Trigger: https://docs.microsoft.com/en-us/azur...

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

Twitter: https://twitter.com/willvelida

Discussion (0)