I'm trying to implement a change feed processor on a database called Entity, where all files are imported as "entitytype-entityid."
Entity
/id /partition-id
customer499 customer499
product4051 product4051
productInventory4051 productInventory4051
I am brand new to CosmosDB and change feeds. I need each lease to start on its respective entitytype and count only that. I think I have to define these things in the delegate function I call during HandleChangesAsync but am totally stuck.
Change Feed Processor will listen for changes in the entire collection, across all documents and schemas stores in it, and it tracks all insert and update operations. There is currently no way for you to add a filter for specific changes.
If you are storing multiple different schemas or want to trigger different flows based on particular document properties, it is something you need to define in the delegate.
If you are dealing with different schemas, you can use the dynamic
type to receive any type of document in the delegate and then check based on its properties which flow it needs to go to.