Aggregation pipeline on restored events from ChangeStream resumeToken


We’re currently simulating a crash event where we’ll need to restart the ChangeStream after a few document changes has already happened. The issue is, the new/resumed ChangeStream seems to restore all events including the changes that are supposed to be filtered with the pipeline that we are passing in our

When the service is running normally, the pipeline works and we only receive the filtered events.

Wen you define the $source you can specify

     "startAfter": <start-token> | "startAtOperationTime": <timestamp>,

See the complete syntax here.