One function with many containers in Cosmos DB

Ihor Dyrman 181 Reputation points
2021-01-21T17:44:07.86+00:00

I have Cosmos DB with many containers inside. I want to push changes from Change Feed to my service bus. I see that I can make a function for listening to one container, but is it possible to make a function that will be triggered for changes in all containers in my Cosmos DB?

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,110 questions
Azure Cosmos DB
Azure Cosmos DB
An Azure NoSQL database service for app development.
1,672 questions
{count} votes

Accepted answer
  1. ChaitanyaNaykodi-MSFT 26,216 Reputation points Microsoft Employee
    2021-01-27T05:10:32.097+00:00

    Hello @Ihor Dyrman , apologies for the delay. I am afraid the requirement cannot be satisfied using a single Cosmos DB triggered function app as this trigger uses the Azure Cosmos DB Change Feed in the backend to listen for inserts and updates across partitions but in the same container. You might have to consider a separate Cosmos DB trigger for each individual containers. Please let me know if there are any concerns, I will be glad to continue with our discussion. Thank you!

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.