Azure Cosmos Db Trigger not working with Azure Cosmos DB API for MongoDB account Mongo API Database Collection
Azure Cosmos Db Trigger not working with Azure Cosmos DB API for MongoDB account Mongo API Database Collection
Where
Azure Portal
What
- Azure Function App with Function Azure Cosmos Db Trigger
- Azure Cosmos DB API for MongoDB account (Mongo API Database + Collection)
How
Upon trigger of update, create, modify, or change of the Mongo API Database collection, the Azure function is not triggered, and this is verified by the log output as shown in the video.
The attached short video shows the setup of the Azure Function integration + Cosmos DB and it not being triggered after the database collection change.
https://user-images.githubusercontent.com/28828668/155247090-6e97a785-8c13-4df2-ab58-da0ee8ccf8b3.mp4
@kathleenwest I encountered the same problem with with Azure Cosmos Core API.I would like to know if this problem is still unresolved at the moment.Thanks
Hi @ealsur Could you please help with this issue?
This is by design. The Cosmos DB bindings and triggers are for the SQL API.
See the Functions doc: https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-cosmosdb-v2?tabs=in-process%2Cfunctionsv2&pivots=programming-language-csharp#supported-apis
This is by design. The Cosmos DB bindings and triggers are for the SQL API.
See the Functions doc: https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-cosmosdb-v2?tabs=in-process%2Cfunctionsv2&pivots=programming-language-csharp#supported-apis
Just to clarify ^, you are saying Azure does not currently have feature support the Mongo API for the Azure Cosmos Db Trigger
There is no Extension for Azure Functions to provide Trigger or Binding functionality for a Mongo API account at this moment. The extension Microsoft.Azure.WebJobs.Extensions.CosmosDB is purely for SQL API operations.
It is technically possible for a user to build a Trigger Extension that uses the Mongo Driver and Change Streams to obtain and report Mongo changes: https://docs.microsoft.com/azure/cosmos-db/change-feed#change-feed-in-apis-for-cassandra-and-mongodb
At this point, there isn't one created and maintained by Microsoft (doesn't mean there never will, just stating the current scenario).
Microsoft does not currently support the feature