locked
Cosmos DB Function For All Collections RRS feed

  • Question

  • Hello, is there any way to create an Azure Function that is triggered for any insert / update for all collections in the database?

    Currently there is only a way to create a function and monitor a single collection.  However we have multiple collections with the same functionality that is needed across all collections so we would need to create 1 function per collection.

    Thanks

    Tuesday, February 27, 2018 9:37 PM

Answers

  • Right now the CosmosDBTrigger is per collection.

    The Trigger leverages the Change Feed Processor SDK to allow for dynamic scale scenarios. Having it per collection allows for scaling based on the activity and partitioning strategy on that particular collection.

    • Marked as answer by Ryan_Ha Wednesday, February 28, 2018 10:15 PM
    Wednesday, February 28, 2018 5:49 PM

All replies

  • Right now the CosmosDBTrigger is per collection.

    The Trigger leverages the Change Feed Processor SDK to allow for dynamic scale scenarios. Having it per collection allows for scaling based on the activity and partitioning strategy on that particular collection.

    • Marked as answer by Ryan_Ha Wednesday, February 28, 2018 10:15 PM
    Wednesday, February 28, 2018 5:49 PM
  • Great, thank you Ealsur.

    Wednesday, February 28, 2018 10:15 PM