Comparison
Change data capturevsLog-based CDC
Change data capture
instead of asking the service to publish events, you read the database's own replication log and turn every row change into one.
Deriving a stream of change events from a database's write-ahead log. It guarantees you see every committed change with no application cooperation, which is why it is the standard way to get data out of a legacy system. The events are row-shaped rather than domain-shaped, so consumers end up coupled to the producer's schema.
Full entry →Log-based CDC
you tail the database's own replication log, so a delete and a mid-second update both come through without the source running a single extra query.
Capturing changes by reading the database's write-ahead or binary log, the same feed a replica consumes. Because the log is the truth of what happened, you get every intermediate state, hard deletes and ordering for free, and you put no query load on the source. The price is operational: it needs a privileged connection, it is coupled to the source's storage engine and version, and if your consumer is down long enough for the log to be rotated away, recovery means a new snapshot.
Full entry →