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 receives (via batch) must be processed only once, this leads to some fundamental questions I've been unable to confirm:
If the net answer is that this trigger is not reliable, just curious what are the intended use cases for its use?
Thanks
-John
Short answer is no. The Cosmos DB Trigger has an "at least once" delivery, which means that an item could be, in some cases, delivered more than once.
For reference, see the Troubleshooting guide: https://learn.microsoft.com/azure/cosmos-db/troubleshoot-changefeed-functions.