Skip to main content

Module source

Module source 

Source
Expand description

MongoDB CDC source connector implementation.

Implements SourceConnector for streaming change events from MongoDB change streams into LaminarDB as Arrow RecordBatches.

§Architecture

  • Ring 0: No CDC code — just SPSC channel pop (~5ns)
  • Ring 1: Change stream consumption, event parsing, Arrow conversion
  • Ring 2: Connection management, collection validation, health checks

§Cancellation Safety

The poll_batch method is cancellation-safe: dropping the future mid-execution does not lose events. Buffered events remain in the internal VecDeque and will be returned on the next poll.

Structs§

MongoDbCdcSource
MongoDB CDC source connector.

Functions§

mongodb_cdc_envelope_schema
Returns the Arrow schema for MongoDB CDC envelope records.