End-to-end CDC replication examples using Debezium connectors with CockroachDB. Every demo is self-contained, fully automated, and self-verifying: one script starts the containers, deploys the connectors, drives changes, and asserts the results.
cd <demo-directory> && ./run-demo.shNew here? Start with crdb-to-crdb, the flagship demo.
How change events leave CockroachDB, and over what transport.
| Demo | Highlights |
|---|---|
| crdb-to-crdb | The flagship. Full CDC replication via Kafka into a second CockroachDB: multi-table, multi-schema, schema evolution, incremental snapshots, UNNEST batch writes on the sink. Optional WORKLOAD=bank phase verifies row-count and total-balance parity under concurrent traffic. |
| crdb-to-sinkless | The same pipeline in sinkless mode: the changefeed streams over the connector's SQL connection, no intermediate Kafka topics (debezium/dbz#2024). |
| crdb-to-crdb-embedded | Fully Kafka-free. Sinkless mode inside the Debezium embedded engine; an in-process consumer applies changes to the target over JDBC. No Kafka, no Kafka Connect. |
| crdb-to-crdb-mtls | Fully-secure pipeline: pgjdbc verify-full to a TLS CockroachDB cluster, and the changefeed pushed to Kafka over mutual TLS via cockroachdb.changefeed.sink.tls.* (debezium/dbz#1974). |
| crdb-to-redpanda | The pipeline with Redpanda replacing Apache Kafka: the changefeed produces into Redpanda and Kafka Connect runs against it. The only configuration delta is the bootstrap address. |
Where the change events land.
| Demo | Target | Highlights |
|---|---|---|
| crdb-to-oracle | Oracle 19c | Coexistence pattern: keep Oracle-based downstream systems (reporting, legacy consumers) continuously fed from an operational CockroachDB via the Debezium JDBC sink (Oracle dialect auto-resolved). For migrating into CockroachDB from Oracle, see oracle-to-crdb. Optional WORKLOAD=tpcc scale test streams the full TPC-C dataset (9 tables, ~600k rows) and asserts per-table row-count parity. |
| crdb-to-iceberg | Apache Iceberg | Via the official Apache Iceberg Kafka Connect sink, with S3-compatible object storage (RustFS) and an Iceberg REST catalog. Queryable from any Iceberg-capable engine (Spark, Trino, DuckDB, ClickHouse). |
| crdb-to-neo4j | Neo4j | Via the official Neo4j Kafka Connect sink (Cypher strategy): rows become nodes, the foreign key becomes a (:Customer)-[:PLACED]->(:Order) relationship, with insert, update, and delete propagation verified. |
Migrating into CockroachDB from other databases via Debezium CDC.
| Demo | Source | Highlights |
|---|---|---|
| oracle-to-crdb | Oracle 19c | Oracle CDC via LogMiner into CockroachDB through the Debezium JDBC sink (CockroachDB dialect auto-resolved). The one-time ARCHIVELOG and LogMiner preparation is fully automated. |
| pg-to-crdb | PostgreSQL | Partitioned table migration using the Debezium PostgreSQL source connector with the ByLogicalTableRouter SMT to merge partition topics. |
- Docker and Docker Compose (or Podman)
The demos download the connector plugins from Maven Central automatically. For your own Kafka Connect deployments, both plugins are also on Confluent Hub: debezium-connector-cockroachdb and debezium-connector-jdbc.
Each demo README documents its own version knobs (CONNECTOR_VERSION,
DEBEZIUM_VERSION, COCKROACHDB_VERSION, and friends) and any demo-specific options.