Connectors / Change data capture

MySQL CDC

source

MySQL CDC source (binlog replication)

Install

cargo install faucet-cli --features source-mysql-cdc
faucet init --source mysql-cdc
# Cargo.toml — use it as a library
cargo add faucet-source-mysql-cdc

Starter config

source:
  type: mysql-cdc
  config:
    connection_url: ""    # REQUIRED — Connection URL, e.g.
    server_id: 0    # REQUIRED — Replica server id.
    # include_tables: []    # Optional client-side allowlist of `db.table` names.
    # exclude_tables: []    # Optional client-side blocklist of `db.table` names (allowlist wins).
    # start_position: { type: current }    # one of: current, earliest, gtid_set, file_pos
      # --- Alternative variants — replace the block above with one of these ---
      # type: earliest
      #
      # type: gtid_set
      # value: ""    # REQUIRED
      #
      # type: file_pos
      # file: ""    # REQUIRED
      # pos: 0    # REQUIRED
    # include_columns: true    # Emit the pre-image (`before`) on updates/deletes.
    # emit_schema_changes: false    # Emit DDL statements as `{op:"ddl"}` records.
    # tls: { type: disable }    # one of: disable, require, verify_ca, verify_full
      # --- Alternative variants — replace the block above with one of these ---
      # type: require
      #
      # type: verify_ca
      # ca_path: ""
      #
      # type: verify_full
      # ca_path: ""
    # idle_timeout: 30    # Terminator: end the fetch cycle after this much quiet.
    # max_staged_records: 1000000    # Max records buffered for a single in-progress transaction before abort.
    # batch_size: 1000    # Advisory per-page record count.

Capabilities

Replay Deterministic replay
Exactly-once replay Yes
Incremental Yes
Dataset discovery No
Reports lag Yes
Compression No

Config fields

FieldTypeDefaultDescription
connection_url
required
string — Connection URL, e.g. mysql://repl:pass@host:3306/db.
server_id
required
integer — Replica server id. **Required** and must be unique across all replicas.
include_tables array [] Optional client-side allowlist of db.table names. Empty = all tables.
exclude_tables array [] Optional client-side blocklist of db.table names (allowlist wins).
start_position object type: current Start position on a fresh run (ignored once a bookmark exists).
include_columns boolean true Emit the pre-image (before) on updates/deletes. Default true.
emit_schema_changes boolean false Emit DDL statements as {op:"ddl"} records. Default false.
tls object mode: disable TLS settings for the replication connection. Default disable.
idle_timeout integer 30 Terminator: end the fetch cycle after this much quiet. Default 30s.
max_staged_records integer 1000000 Max records buffered for a single in-progress transaction before abort. Defaults to 1,000,000; null = unbounded. Also caps the rows held behind an undecided XA transaction, which default to 1,000,000 when this is null.
batch_size integer 1000 Advisory per-page record count. 0 = accumulate all txns into one page.
Get started

Your first pipeline runs in five minutes.

Install the CLI, scaffold a config, and move real data — nothing external to stand up.

curl -LsSf https://github.com/faucet-hq/faucet-stream/releases/latest/download/faucet-cli-installer.sh | sh
brew install faucet-hq/faucet-stream/faucet-cli