Questions tagged [cosmosdbtrigger]
23 questions
3
votes
1 answer
How to handle different document types when listening to change feeds in Azure Functions Cosmos Db Triggers Extensions v4?
I have a container which I listen to it it's changes. Depending on the type of document I receive from the change feed, I handle each document differently as I populate or update my materialized view container for my read-heavy app.
In the latest…

Robert Mrobo
- 119
- 9
3
votes
1 answer
CosmosDBTrigger reliably processing each document exactly once?
My customer would like to use a CosmosDBTrigger to transfer documents to an Azure Service Bus. In this scenario it's important to have a 1:1 relationship between Cosmos item mutations and Service Bus messages.
So, each document that the trigger…

JohnKoz
- 908
- 11
- 21
2
votes
0 answers
How to configure non-string values in CosmosDBTrigger (or any other Trigger) attribute
I have a function in a c# class library project that is triggered by a change in a cosmos database:
[FunctionName("SomeFunction")]
public async Task Run(
[CosmosDBTrigger(
databaseName: "%CosmosDatabaseName%",
collectionName:…

user1354455
- 23
- 2
2
votes
1 answer
Azure Function App CosmosDbTrigger Gives Null Parameter Error
I am defining an Azure Function App as follows:
public static void Run(
[CosmosDBTrigger(
databaseName: "dbName",
collectionName: "collectiontoMonitor",
ConnectionStringSetting =…

Shamim Hafiz - MSFT
- 21,454
- 43
- 116
- 176
1
vote
2 answers
How to identify "insert" vs "update" diff in Azure Cosmos DB trigger?
I have created a function triggered by Azure Cosmos DB by following https://learn.microsoft.com/en-us/azure/azure-functions/functions-create-cosmos-db-triggered-function which is working.
Upon seeing logs, I am unable to identify if this trigger is…

GThree
- 2,708
- 7
- 34
- 67
1
vote
1 answer
Azure Function cosmosDB trigger managed identity not working
I created an isolated Azure functions for cosmosDB trigger. I'm using Microsoft.Azure.Functions.Worker.Extensions.CosmosDB --version 4.0.0-preview2 to use managed identity. Below is my function.
[Function("CosmosDBTrigger")]
public void…

DxG
- 147
- 4
- 17
1
vote
0 answers
AzureFunction with CosmosDbTrigger+RetryPolicy won't retry after function restart
I am trying to trigger an azure function on a change in cosmos db using the cosmos db changefeed. I am trying to trigger the function "at-least-once" using the available retry-policies:…

Mattias Nordqvist
- 898
- 6
- 14
1
vote
0 answers
How to access etag header from response in Cosmos DB post-trigger
I am writing a Cosmos DB post-trigger (NOT the Azure Function Trigger kind but the in-server JS one). In this trigger, I need to access the etag header generated in the response. The trigger works fine except when I add the following code :
//…

Gilles jr Bisson
- 449
- 4
- 11
1
vote
2 answers
CosmosDBTrigger not getting invoked when CosmosDB binding is also present
I'm trying to make a CosmosDBTriggered function in my precompiled C# CI/CD deployed project.
Here's the function implementation, which gets deployed with no complaints. I've tried static and instance methods.
There are no errors but also no…

Jason Kleban
- 20,024
- 18
- 75
- 125
1
vote
3 answers
CosmosDB trigger for Azure functions
My question is around the cosmosDB trigger for functions. We are exploring the best way to trigger our functions. Our original idea was to trigger it by pushing messages into a service bus and have the functions instantiate from a service bus…

Anupam Chand
- 2,209
- 1
- 5
- 14
1
vote
1 answer
Azure Cosmos Lease Container only creates one lease for whole container even though there are thousands of partitions
I have created an azure function that uses CosmosDBTrigger to monitor changes.
I added 120,000 items to the container very quickly and watched my azure function scale to 20 servers but there CPU was barely being utilized (except for one)
I checked…

Daniel Boyer
- 371
- 3
- 18
1
vote
2 answers
Access CosmosDB from Azure Function (without input binding)
I have 2 collections in CosmosDB, Stocks and StockPrices.
StockPrices collection holds all historical prices, and is constantly updated.
I want to create Azure Function that listens to StockPrices updates (CosmosDBTrigger) and then does the…

roman m
- 26,012
- 31
- 101
- 133
1
vote
0 answers
CosmosDBTrigger lost document change or only capture most recent change during restarting period
Recently I am encountering an issue that my CosmosDBTrigger Azure Function would only capture my last update record when it's restarting, or sometimes it's not even getting the chance to trigger from restarting if there is document change during the…

Drex
- 3,346
- 9
- 33
- 58
1
vote
1 answer
Azure Function App CosmosDBTrigger Gets Executed Twice
I have setup up an Azure Function to trigger whenever there is a change in CosmosDB, thereby making it a CosmosDBTrigger. It seems the function is being called twice. I know this by looking into the monitor. The two calls occur within few minutes of…

Shamim Hafiz - MSFT
- 21,454
- 43
- 116
- 176
0
votes
1 answer
Azure Function CosmosDB Trigger does not pick-up the changes in one partition
I'm facing a problem with the Azure Function v4 with the cosmos DB trigger. The function doesn't pick up the changes on a specific Partition value, however still running properly in other partition value. There is no sign of function running that…

Quy Truong
- 413
- 3
- 9