Enum MongoDbChangeStreamResumeMode
Identifies which change-stream resume option a stored resume token must be reopened with.
public enum MongoDbChangeStreamResumeMode
Fields
ResumeAfter = 0Reopen with
resumeAfter— the ordinary checkpoint case.StartAfter = 1Reopen with
startAfter— required to advance past aninvalidateevent.
Remarks
MongoDB exposes two ways to reopen a change stream from a token, and they are not interchangeable.
resumeAfter reopens an ordinary checkpoint; it cannot carry a stream past an invalidate
event. startAfter can, and is the documented way to continue watching a namespace that was
dropped, renamed, or whose database was dropped. The server rejects a request that supplies both.
The mode therefore travels with the token rather than being decided at the point of reopening: a checkpoint written just past an invalidation is only usable as a StartAfter, and that must survive a process restart along with the token itself.