Debezium turns your database into an event stream. Every change — insert, update, delete — becomes a Kafka event. Here’s how to get started.
What is Change Data Capture?
CDC captures row-level changes in databases. Instead of polling for changes, Debezium reads the database’s transaction log and streams changes in real-time.
Architecture
Database → Debezium Connector → Kafka → Consumers
(reads tx log) (downstream systems)
Supported Databases
- PostgreSQL
- MySQL / MariaDB
- SQL Server
- MongoDB
- Oracle (incubating)
Docker Compose Setup
services:
connect:
image: debezium/connect:1.0
ports:
- "8083:8083"
environment:
BOOTSTRAP_SERVERS: kafka:9092
GROUP_ID: 1
CONFIG_STORAGE_TOPIC: connect_configs
OFFSET_STORAGE_TOPIC: connect_offsets
Use Cases
- Keep search indexes in sync
- Replicate to data warehouse
- Trigger downstream pipelines
- Audit logging
- Cache invalidation
References
Discover more from C4: Container, Code, Cloud & Context
Subscribe to get the latest posts sent to your email.