CDC with Debezium

Read the WAL/binlog, get a perfect event stream for free.

0/2 done

DB → log → Kafka

Why CDC

Change-Data-Capture (Debezium) tails the database's transaction log (MySQL binlog, Postgres WAL, SQL Server CDC tables) and emits one Kafka record per row change. Benefits over dual-writes:

  • No outbox needed for read-only consumers — the DB is the source of truth.
  • Atomic with the transaction (you can't drift).
  • Replay from any LSN — perfect for rebuilding caches, search indexes, vector stores.

Pair with the outbox pattern when you need to emit domain events (not raw row changes) atomically with state writes.

Debezium MySQL source connector

Publish row-level changes from the acme.orders table into Kafka. Include snapshot mode, key-converter, and Debezium's standard unwrap SMT so consumers see the latest row state, not the envelope.

Reflect

Map a CDC use case in your stack.

  • Which downstream system would benefit most from row-level CDC instead of nightly ETL?
  • Where does the outbox pattern still beat raw CDC for you?

Reading in progress · 0 of 2 activities done