Skip to main content

Module source

Module source 

Source
Expand description

MongoDB CDC source connector implementation.

Implements crate::connector::SourceConnector for streaming change events from MongoDB change streams into LaminarDB as Arrow RecordBatches, in one of two shapes:

  • history: every event (and every snapshot copy) becomes an immutable, versioned record;
  • document: full post-images become keyed puts and deletes become key-only tombstones.

§Cancellation Safety

Connector lifecycle futures never directly poll the MongoDB driver. Driver I/O lives in an owned reader task; cancellation aborts that task so no connection or cursor outlives its connector.

Structs§

MongoDbCdcSource
MongoDB CDC source connector.

Constants§

MONGODB_HISTORY_VERSION
Version of the history record layout; incremented on any incompatible change.
SNAPSHOT_OPERATION
operation value of a document copied by the initial snapshot rather than observed.

Functions§

mongodb_history_schema
Returns the Arrow schema of MongoDB change-history records.