question

AlexIp-8657 avatar image
0 Votes"
AlexIp-8657 asked AlexIp-8657 commented

Database Wide Change Feed Support?

The scenario is this:
I have multiple containers in the database, each belonging to a tenant, I can use a change feed for each container.

I have two options:

  1. Create multiple function apps one for each container to handle the change feed trigger

  2. Create one function with one trigger for each container

I now have two questions:

  1. Will there be any chance of having database-wide change feed support?

  2. What is the best way to accomplish this based on my two options above?


azure-cosmos-db
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

AnuragSharma-MSFT avatar image
0 Votes"
AnuragSharma-MSFT answered AlexIp-8657 commented

Hi @AlexIp-8657, welcome to Microsoft Q&A forum.

To answer your first query, currently change feed includes inserts and update operations made to items within the container, not at the database level.

Yes we can create azure function to monitor change feed from container but the restriction is one Azure function can monitor the change feed for one container only. Now this function can work across the partitions within the container but not for multiple container. So your first approach looks right.

Azure Cosmos DB trigger for Azure Functions 2.x and higher

Please let me know if this helps or else we can discuss further.


If answer helps, you can mark it 'Accept Answer'




· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Creating a function app for each container is fine, but seems hard to maintain once you have more than 10 containers.
If it was at the database level then it would be more convenient to create one and funnel all the data through the one app, but since it doesn't exist we'll have to find alternatives.

Thank you for the answers.

1 Vote 1 ·