resources/docker/cdc_schema_registry/README.md
Demonstrates a full CDC pipeline: capturing changes from PostgreSQL, encoding them as Avro via the Schema Registry (using the common schema metadata from the CDC input), and consuming the Avro-encoded messages from a Redpanda topic.
The schema is auto-registered with the Schema Registry — no manual schema management required. The postgres_cdc input attaches a common schema to each message's metadata, and the schema_registry_encode processor converts it to Avro and registers it automatically.
┌─────────────┐ ┌──────────┐ ┌────────────────────┐ ┌──────────┐ ┌──────────────┐
│ generate │────>│ postgres │────>│ cdc + avro encode │────>│ redpanda │────>│ avro decode │
│ (sample data)│ │ │ │ (schema registry) │ │ topic │ │ + stdout │
└─────────────┘ └──────────┘ └────────────────────┘ └──────────┘ └──────────────┘
Three pipelines:
docker compose up -d
docker compose logs -f connect-consume
You should see JSON messages with the CDC operation, table name, and decoded row data:
{"data":{"category":"electronics","created_at":"...","id":1,"in_stock":true,"name":"premium widget","price":"29.99"},"operation":"read","table":"products"}
docker compose down -v