Change data capture
Definition
Change data capture tails the database's replication or commit log (the PostgreSQL WAL, the MySQL binlog) and publishes each committed row change as an event, in commit order.
In practice
Because it reads what the database actually committed, CDC catches every writer, including scripts and services that would forget to publish an event or invalidate a cache. It feeds search indexes, caches, analytics and outbox relays with low latency and no polling queries against the tables.
Row changes are not domain events: they expose the table schema, so consumers break when columns change, which is why many teams use CDC only on an outbox table. CDC adds a lagging pipeline to operate, holds log segments on the database until they are read (a stalled connector can fill the disk), and needs a snapshot to start from existing data.
Example
Debezium reads the PostgreSQL WAL and publishes an UPDATE to products id 42 to a Kafka topic; a consumer deletes product:42 from Redis about 200 ms after the commit.