Queues, Streams, Eventing
Change data capture: free-recall review
Retrieval beats re-reading. For each prompt, say or write a full answer from memory before you open the model answer — the effort of recall is what makes the mechanism stick.
Reconstruct the unit’s core mechanisms — log-based capture vs polling, the slot as a loaded gun, snapshot-then-stream, delete capture, and at-least-once delivery — without looking back at the lesson.
- 01Why does log-based CDC beat polling a table on a cursor, on every axis that matters?
- 02Explain why a logical replication slot can take down the primary, and what you put in place before shipping CDC.
- 03What is the snapshot-then-stream startup, and why is the snapshot the dangerous part?
- 04Why does capturing full DELETE events need REPLICA IDENTITY FULL, and what does it cost? What is a tombstone?
- 05Why is CDC delivery effectively at-least-once, and how does that change how you write the consumer? How does ordering help?
- 06When would you reach for the outbox pattern instead of capturing domain tables directly, and how does it relate to CDC?
If you could reconstruct each answer from memory, you hold the unit’s spine: log-based CDC beats polling on latency, completeness, query load, and app intrusion; the slot’s unconditional WAL promise is both why CDC is resumable and why it can fill a disk, so you alert and cap; startup is snapshot-then-stream with incremental snapshots avoiding the long lock; full deletes cost WAL via REPLICA IDENTITY FULL and need tombstones for compaction; delivery is at-least-once so consumers must be idempotent; and the outbox composes with CDC to give you a schema-decoupled, atomic event contract.