First Class Support for Create/Update Differentiation w/i ChangeFeed
Add a mechanism to determine the type of change feed event being processed. Actions (e.g. Create/Update/Delete) should be accessible via the FeedResponse<T> (for the .net SDK) for each document.
In addition, CreateDocumentChangeFeedQuery should allow for filtering by these new action types (w/i the DB). Perhaps other [document-level] criteria should be supported too.
Update: The ETA for this has not been set. This is actively being worked on but cannot provide ETA.
Our apologies again. We are looking forward to shipping this feature.
Quick update. Apologies for the long time on this. We are looking to ship this in Spring 2020.
There is no way to distinguish between inserts and updates in the change feed. If there is a large volume of inserts and updates to documents in a collection, some will need to trigger other processes and others will not.
Eg - an updated address could trigger the need to update the address on billing invoices in a different collection, where an update to a profile picture would not need to trigger anything.
Two years since this comment, I'm curious where this issue stands on the roadmap/backlog of the Cosmos product team. If the change feed is to enable "true" event-sourcing or change data capture patterns, the events themselves ought to be available for consumption.
Why is there no support for deletes? I'd like deleted documents to show up in Change Feed as well.
Michael Koltachev commented
Thanks for your feedback, as of current, Change Feed API, doesn't expose a way to do that in general case, but depending on scenario this can be done. For instance, if you get changes and upload them somewhere else, you can get the content of the doc from that "somewhere else" and compare, or if possible you can cache documents and compare the version coming from doc on change feed.
"previous image" (opt-in) feature is considered for later, if this feature gets added, it would help this scenario.
If I have a document and multiple client are working on same document, (Ex: client-1 changed property-1 and client-2 changed property-2). How can I change feed library processor figure out what is exactly changed?
Peter Dotsenko commented
I would like to filter by document label. For instance i have 60K changes, and 55K are changes to edges, but only 5K are vertex changes of label "Person" for example. I would like to get only vertices that have label "Person". Add filter option to ChangeFeedOptions.
Josh Lane commented
Agree with this proposal... versions can help but that does require some extra effort.