Debezium's Architecture

Debezium's Log-Based Architecture

Debezium 317,608 is a set of source connectors, one per database, that read its change log: the write-ahead log on PostgreSQL 1,289 , the binlog on MySQL 524 and MariaDB 3,681 , LogMiner on Oracle. Each connector first takes an optional snapshot of the existing rows (events with op = r), then streams every committed change in commit order, and records its position in the log as an offset so a restart resumes where it stopped. Kafka Connect 129 and Debezium Server host the connectors here; a third host, the Debezium Engine library, embeds one in your own Java application:

Debezium's PostgreSQL pipeline as run in this section, and the Debezium Server alternative
Debezium's PostgreSQL pipeline as run in this section, and the Debezium Server alternative

Every event is an envelope: before and after row images, op (r read in a snapshot, c create, u update, d delete), ts_ms, and a source block naming the connector, database, table, transaction and log position. The first snapshot event on the topic:

Output of 43
{"op":"r","before":null,"after":{"order_id":1,"customer_id":2518,
"order_ts":"2025-01-01T00:02:38.000000Z","channel":"ios","status":"delivered","currency":"USD",
"coupon":null,"discount":"AA==","total":"D7Q="},
"source":{"connector":"postgresql","version":"3.7.0.Final","snapshot":"first","table":"orders",
"lsn":689248272}}

total is "D7Q=" because the default decimal.handling.mode=precise encodes numeric as the unscaled integer in bytes (0x0FB4 = 4020, scale 2: 40.20) with the scale in the schema. Schema-aware consumers such as the JDBC sink decode it; for plain JSON readers, set the mode to string.