-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: None
-
Labels:
-
Query Execution
-
(copied to CRM)
At the moment, the changestream definition only allows to specify the fullDocument flag.
For some use cases, it would be beneficial (to save network bandwidth) to specify the projection, so the client will receive the changes along with the few document's fields instead of receiving the multi-megabyte payload containing the whole document.
The use case is that in a typical UPDATE scenario, teams only need a few "read-only" fields in addition to the delta to help identify a change that needs to be made in a downstream system.
However, in some cases, documents can get pretty large because they grow over time (multi-MB is not out of the question). Having to read in a full multi-MB document when all you need is <100 bytes is difficult, puts pressure on the network and memory for no benefit.