Class MongoDbChangeStreamOptions
Change stream configuration options for MongoDB CDC processor.
public sealed class MongoDbChangeStreamOptions
- Inheritance
-
MongoDbChangeStreamOptions
- Inherited Members
Remarks
Follows the MongoClientSettings pattern of separating change stream configuration from connection properties.
Properties
FullDocument
Gets or sets whether to include the full document in change events.
public bool FullDocument { get; set; }
Property Value
Remarks
When true, update operations include the full document after the change. When false, only the delta is included (default MongoDB behavior).
FullDocumentBeforeChange
Gets or sets whether to include pre-image of the document (MongoDB 6.0+).
public bool FullDocumentBeforeChange { get; set; }
Property Value
Remarks
Requires change stream pre and post images to be enabled on the collection.
MaxAwaitTime
Gets or sets the maximum time to wait for new changes.
public TimeSpan MaxAwaitTime { get; set; }
Property Value
Remarks
This controls the getMore behavior. If no documents are available, the server will return an empty batch after this time.
OperationTypes
Gets or sets the operation types to watch for.
public string[] OperationTypes { get; set; }
Property Value
- string[]
Remarks
If empty, watches all operation types. Valid values: insert, update, replace, delete, invalidate.