Created
April 2, 2018 03:13
-
-
Save ealsur/d843f421dfa724c4b5e45ecf2a6cd9c9 to your computer and use it in GitHub Desktop.
Azure Cosmos DB + Functions Cookbook - multi triggers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[FunctionName("Trigger1")] | |
public static void Run( | |
[CosmosDBTrigger("<your-monitored-database>", | |
"<your-monitored-collection>", | |
ConnectionStringSetting = "<your-connectionstring-setting>" | |
LeaseCollectionPrefix = "trigger1")] | |
IReadOnlyList<Document> input, | |
TraceWriter log) | |
{ | |
log.Info("Documents modified " + input.Count); | |
log.Info("First document Id " + input[0].Id); | |
} | |
[FunctionName("Trigger2")] | |
public static void Run( | |
[CosmosDBTrigger("<your-monitored-database>", | |
"<your-monitored-collection>", | |
ConnectionStringSetting = "<your-connectionstring-setting>" | |
LeaseCollectionPrefix = "trigger2")] | |
IReadOnlyList<Document> input, | |
TraceWriter log) | |
{ | |
log.Info("Documents modified " + input.Count); | |
log.Info("First document Id " + input[0].Id); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment