Skip to main content

Change Streams

Thermocline supports $changeStream handling through gateway/coordinator integration.

Flow

  1. Client sends aggregate with $changeStream.
  2. Gateway detects change-stream pipeline and routes to change-stream handling.
  3. Cursor manager stores and serves events via getMore.

Code Anchors

  • Detection: services/gateway/src/changestream/detection.rs
  • Cursor manager: services/gateway/src/changestream/cursor.rs
  • Handler routing: services/gateway/src/proxy/handler/mod.rs

Notes

  • Resume/token and cursor semantics are implemented in gateway cursor manager paths.
  • Meteor oplog compatibility is handled through the gateway virtual DB path (local.oplog.rs) and is intentionally compatibility-scoped, not a full MongoDB oplog clone.