Early access launch price $39 for the first two weeks

Zero-Loss CDC: a production playbook for MySQL to Debezium to Kafka to ClickHouse

Most CDC tutorials stop when the first event shows up in a topic. This playbook starts there: how to make sure every row change reaches the warehouse, how to prove it did, and what to do on the day it doesn't.

Launch price $39 for the first two weeks, then $49. Email me to get the release link.

PDF + EPUBDocker Compose labNo employer code14-day refund

Illustration of the method in the book. All examples use a fictional shop schema.

12chapters, each ending with a checklist
200+MySQL tables on the CDC platform I run
28,000rows a minute at peak on that platform
14-dayrefund if it is not useful to you
Outcomes

What you will be able to do

Every row change reaches the warehouse, and you can prove it.

  • Configure MySQL binlog and Debezium so you capture every insert, update and delete, including during snapshots
  • Run a 3-node Kafka cluster in KRaft mode without ZooKeeper
  • Write Python consumers that commit offsets only after ClickHouse confirms the write (fail-closed)
  • Pick the right ClickHouse table engine for upserts and deletes from CDC
  • Reconcile source and warehouse down to the row id, and alert on drift
  • Backfill a table or a time window without double counting
  • Run a separate webhook consumer group off the same topics without slowing the warehouse
12 chapters

Table of contents

Plus appendices: full config reference, reconciliation SQL and a glossary.

  1. CHAPTER 01

    Why CDC pipelines lose rows (and why nobody notices)

    Where rows go missing and why dashboards hide it.

  2. CHAPTER 02

    Reference architecture and the zero-loss contract

    The five hops, what each one promises, and the one rule: nothing is acknowledged until the next hop has it.

  3. CHAPTER 03

    MySQL binlog setup that holds up in production

    ROW format, full row image, GTIDs, binlog retention vs. worst-case outage, grants, replicas as source.

  4. CHAPTER 04

    Debezium connector configuration, snapshots and schema history

    Snapshot modes, incremental snapshots via a signal table, schema history protection, heartbeats, tombstones.

  5. CHAPTER 05

    Kafka in KRaft mode: a 3-node cluster, topics, partitions, retention

    Controller quorum, replication factor 3, min.insync.replicas 2, acks=all, retention sized for your longest outage.

  6. CHAPTER 06

    Fail-closed Python consumers: commit only after the warehouse confirms

    Auto-commit off, batch, insert, confirm, commit. Idempotent writes, poison messages, rebalances.

  7. CHAPTER 07

    ClickHouse modelling for CDC: ReplacingMergeTree, versions, deletes

    Version columns, delete markers, FINAL vs. argMax views, partitioning, async insert trade-offs.

  8. CHAPTER 08

    Id-level audit and reconciliation

    Per-table id-range checksums, missing-id detection, hourly and daily jobs, drift alerts.

  9. CHAPTER 09

    Backfills and replays without double counting

    Re-snapshot one table, replay a time window from Kafka, version-based dedupe, cutover checklist.

  10. CHAPTER 10

    A second consumer group for webhooks and side effects

    Separate group ids and lag budgets, at-least-once side effects with idempotency keys.

  11. CHAPTER 11

    Monitoring, alerting and the on-call runbook

    Connector state, consumer lag, binlog position vs. retention, reconciliation drift, and what to do for each.

  12. CHAPTER 12

    Schema changes, upgrades and the go-live checklist

    DDL on the source, adding columns, renames, Kafka and Debezium upgrades, and the go-live list.

Audience

Who this is for

Data engineers and backend engineers who have to move MySQL data into ClickHouse (or a similar warehouse) in near real time and cannot afford silent gaps. You should be comfortable with SQL, Python and Docker. You do not need to be a Kafka expert.

SQLPythonDockerDebezium 2.x/3.xKafka 3.x/4.x KRaftClickHouse
Format

What you get

PDF and EPUB, 12 chapters, all config and code snippets, and a checklist at the end of every chapter.

Lab tier: a Git repository with the Docker Compose setup (MySQL, Debezium, 3-node KRaft Kafka, ClickHouse) and the reconciliation SQL.

Free updates for every 2027 edition.

The author

Written from production, not from the docs

I'm Danish Rajpoot, a Principal Data Engineer with 8+ years in data platforms. I run a CDC platform replicating 200+ MySQL tables into ClickHouse at peaks above 28,000 rows a minute. The playbook is the method behind it, rewritten from scratch with generic examples. No employer code, configs or internal documents are included.

8+years in data platforms
200+MySQL tables replicated
28krows a minute at peak

LinkedIn · GitHub

Pricing

Playbook pricing

One-time payment. Pick the depth you need.

Playbook + lab

$79

Adds a Docker Compose lab (MySQL, Debezium, 3-node KRaft Kafka, ClickHouse) and the reconciliation SQL pack.

Get early access

Team

$149

Up to 10 readers, the lab, and a 45-minute call to review your pipeline design.

Get early access

Free updates for every 2027 edition. 14-day refund if it is not useful to you.

FAQ

Kafka CDC playbook: questions

Does it cover PostgreSQL or SQL Server?

The examples use MySQL. The consumer, reconciliation and backfill chapters apply to any Debezium source, and the notes call out Postgres differences.

Is this for Kafka Connect sinks or custom consumers?

Custom Python consumers. Chapter 6 explains when the ClickHouse Kafka engine or a Connect sink is good enough and when it is not.

Which versions does it use?

Recent Debezium 2.x/3.x, Kafka 3.x/4.x in KRaft mode, and current ClickHouse. Version-specific settings are marked.

Is any company code included?

No. Every example is written from scratch for the book with fictional tables.

What format do I get?

PDF and EPUB. The lab tier includes a Git repository with the Docker Compose setup and SQL.

Can I get a refund?

Yes, within 14 days, no questions asked.

Early access

Stop guessing whether your pipeline dropped rows

Get the method, the checks and the runbook in one place.

Launch price $39Then $49Buy $39