This new Change Feed feature provided by DocumentDB is pretty cool. However, the documentation states:
Each change to a document appears only once in the change feed. Only the most recent change for a given document is included in the change log. Intermediate changes may not be available.
Basically, if a document goes from revision A->B->C, when the change feed is polled, we're only going to get "C." - I have a situation where I want to see "A" and "B" as well.
I know of a few existing patterns to solve this, but I was really hoping to leverage this new Change Feed feature. I hoped it would return A, B, and C.
Is the intent of this feature to have "workers" polling the service very frequently? Obviously, the more frequently workers poll, the less likely they are to skip a revision to a document. However, I wouldn't want to adversely affect performance of the collection as a result.
DocumentDB team member here. I'll start off saying please propose/vote for support for all versions/generations of the document here: http://feedback.azure.com/forums/263030-documentdb
The intent of Change Feed supporting the latest version was for two reasons:
You had mentioned you're already aware of workarounds, but I'll just state this for the benefit of others: this problem can be solved by inverting what's stored in DocumentDB. That is, you can store all versions in DocumentDB via creating new documents, then consolidate them via change feed by upserting the latest version.
To answer the question in comments, you must absolutely use Change Feed over querying by timestamp for the following reasons:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With