← Back to microservices patterns mapCDC
👂
Microservices Pattern
Change Data Capture (CDC)
Capture database changes and publish them as events.
Detailed Description
CDC watches the database transaction log rather than relying on application code to publish events.
It is commonly used for outbox publishing, projections, search indexes, and analytics streams.
Visual Diagram
DB commit -> transaction log CDC connector -> event stream Consumers update projections
Tradeoffs
Pros
Low app-code change, reliable change stream
Cons
Operational complexity and schema evolution
Examples: Debezium, Kafka Connect, database logs