conduktor.io ↗
CDC · Event Envelope · Data flow

From PostgreSQL to a Kafka topic

Debezium tails the database log, wraps each change in a standard envelope, and publishes it to Kafka. Click a stage to inspect what's on the wire there.

Connector
Operation
postgresql-c.json
{
  "before": null,
  "after": {
    "id": 1001,
    "first_name": "Alice",
    "last_name": "Smith",
    "email": "alice@example.com",
    "created_at": 1714000000000
  },
  "source": {
    "version": "3.0.5.Final",
    "connector": "postgresql",
    "name": "pgserver1",
    "ts_ms": 1714000000000,
    "snapshot": "false",
    "db": "inventory",
    "sequence": "[null,\"24023128\"]",
    "schema": "public",
    "table": "customers",
    "txId": 555,
    "lsn": 24023128,
    "xmin": null
  },
  "op": "c",
  "ts_ms": 1714000000142,
  "transaction": null
}
Field reference23 fields · hover to align
beforeobject | nullRow state immediately before the change.null for INSERT
afterobject | nullRow state after the change.
idint
first_namestring
last_namestring
emailstring
created_atint
sourceobjectChange origin metadata — log position, connector info, DB coordinates.
versionstringDebezium version that produced the event.
connectorstringConnector type: postgresql, mysql, sqlserver, mongodb.
namestringLogical connector name — also the Kafka topic prefix.
ts_msintWhen the change occurred in the source DB (ms epoch).
snapshotstring"true" | "false" | "last" | "incremental" — whether this event is from a snapshot.
dbstringSource database name.
sequencestringPostgres: [last_commit_lsn, current_lsn] ordering token.
schemastringSource schema (PostgreSQL and SQL Server only).
tablestringSource table name.
txIdintPostgres: transaction id.
lsnintPostgres: WAL byte offset — the exact log position.log position
xminnullPostgres: xmin horizon (rarely populated).
opstringOperation code: c=INSERT, u=UPDATE, d=DELETE, r=snapshot, t=truncate.op = "c"
ts_msint64When Kafka Connect processed the event. For source DB time, read source.ts_ms.
transactionobject | nullTransaction grouping — null unless provide.transaction.metadata=true.