Change data capture
Your app saves a product to the database, then updates the search index. One day it crashes in between, and search shows the old price for a week. Writing the same change to two places from your code will eventually disagree. Change data capture reads the change from the one place it's guaranteed to be.
In this lesson you'll learn to
- Explain the dual-write problem and why writing to a database and a second system from app code drifts apart.
- Describe how change data capture reads a database's own log, with an initial snapshot followed by a stream of changes.
- Use the transactional outbox to publish clean events reliably, instead of exposing internal tables.
- Run CDC safely, including retained log growth, schema changes, deletes and duplicate events.
Create a free account to open this lesson
It's free. You'll get every free lesson, quizzes that save your progress, daily flashcards and streaks.