Debezium is a CDC platform that reads a database's change logs (WAL, binlog, etc.) and streams change events to Kafka topics. An open-source project led by Red Hat, it enables row-level change capture without query-based polling.
How it works: It reads the database's transaction log directly (PostgreSQL's WAL, MySQL's binlog, MongoDB's oplog) to detect INSERT, UPDATE, and DELETE events. It captures changes with millisecond-level latency without putting load on the source DB.
Supported databases: Through connectors, it supports a wide range of databases including PostgreSQL, MySQL/MariaDB, MongoDB, SQL Server, Oracle, Cassandra, and Db2. Each connector natively implements that DB's replication protocol.
Use cases: (1) Data synchronization between microservices - the inventory service subscribes to order service DB changes, (2) real-time updates of Elasticsearch/Redis caches, (3) real-time ETL for data warehouses, (4) implementing event sourcing/CQRS patterns, (5) gradual migration from a legacy monolith to microservices.
Debezium events are delivered as structured JSON containing the before/after data of the change, source metadata (table name, transaction ID), and the operation type (c/u/d/r), which makes downstream processing easy.