Skip to main content

faucet_source_mssql_cdc/
lib.rs

1#![cfg_attr(docsrs, feature(doc_cfg))]
2//! Microsoft SQL Server CDC (change data capture) source for the faucet-stream
3//! ecosystem.
4//!
5//! Polls native SQL Server change data capture — `sys.fn_cdc_get_max_lsn()` for
6//! the high-water LSN, then `cdc.fn_cdc_get_all_changes_<capture_instance>()`
7//! per configured capture instance — and emits per-row change events as CDC
8//! envelopes, resumable via a per-instance LSN bookmark. Each committed
9//! transaction is emitted as its own [`StreamPage`](faucet_core::StreamPage),
10//! giving per-transaction durability and exactly-once-capable replay.
11//!
12//! Pair the emitted `{op, before, after, …}` envelopes with the `cdc_unwrap`
13//! transform stage and an upsert-capable sink to build a live mirror pipeline.
14
15mod change;
16mod config;
17mod decode;
18mod descriptor;
19mod lsn;
20mod state;
21mod stream;
22
23pub use config::{MssqlCdcSourceConfig, OnGap, StartPosition};
24pub use descriptor::DESCRIPTOR;
25pub use lsn::Lsn;
26pub use state::Bookmarks;
27pub use stream::MssqlCdcSource;