CDC Pipeline - Middle¶
CDC takes a consistent snapshot, records its log position, then continues from that position without a gap.
flowchart LR
Snapshot[Read existing rows] --> Cutover[Recorded LSN] --> Stream[Tail WAL] --> Kafka
A Postgres replication slot retains WAL until Debezium confirms progress. Key Kafka records by primary key for per-row order. The sink stores source position/version with each effect so redelivery is harmless. REPLICA IDENTITY determines what UPDATE and DELETE contain. Test yourself¶
- What connects snapshot and stream?
- Why key events by primary key?
- What does a replication slot retain? Continue to
senior.md.