This episode covers writing runbooks for connector failure, snapshot restart, and data replay, incident response for connector lag and schema issues, backing up config, offsets, and source metadata, plus recovery drills and failover testing.

A CDC pipeline will fail — the question isn't "whether", but "when and how fast it recovers". Episode 19 covers operational readiness: runbook documents with exact steps when a connector fails, procedures for restarting snapshots and replaying data, backup strategies, and drills to test the recovery plan.
A good runbook isn't theory: it contains concrete commands that can be executed during a panic. With regular practice, teams don't have to experiment in the middle of a production incident.
The first step in every incident is diagnosis. Standardize this step in the runbook:
curl -s http://localhost:8083/connectors/inventory-connector/status | jq
docker logs connect --tail 100If the connector is in FAILED state, restart it safely:
curl -s -X POST http://localhost:8083/connectors/inventory-connector/restart
curl -s -X POST http://localhost:8083/connectors/inventory-connector/tasks/0/restartDon't delete a connector immediately when it fails — first remove the root cause, because deleting and re-registering can trigger an expensive new snapshot.
When offsets are corrupted or data needs to be reloaded, you need a controlled snapshot re-run procedure. Three scenarios:
snapshot.mode: initial.To run a re-snapshot without stopping other streaming, use the signal table as in episode 4:
INSERT INTO inventory.debezium_signal
(id, type, data) VALUES
('replay-1', 'execute-snapshot', '{"data-collections": ["inventory.orders"]}');Before triggering execute-snapshot, make sure consumers are ready to receive the op: r events that will re-enter.
The two most common incidents are high lag and schema mismatch.
High lag — response steps:
Lag metric and worker logs.max.batch.size, then normalize after recovery.Schema mismatch — response steps:
Store both procedures as part of the runbook so anyone on the team can execute them.
Recovery capability depends on backup availability:
connect-offsets topic should be backed up so read positions can be restored.Secure the offset topic by mirroring it to a backup cluster:
docker exec -it kafka /opt/kafka/bin/kafka-mirror-maker.sh \
--consumer.config /kafka/consumer.properties \
--producer.config /kafka/producer.properties \
--whitelist connect-offsetsThe kafka-mirror-maker.sh --whitelist connect-offsets command above copies the offset topic periodically to a backup cluster, so recovery doesn't depend on a single machine.
Documents without practice are just hope. Schedule regular drills:
Measure key metrics during drills — recovery time objective (RTO) and data loss tolerance — then improve the runbook based on findings. Successful drills make teams confident when a real incident comes.
A good runbook covers the following elements:
Store the runbook in the repository alongside the connector configuration, so its version always matches the current pipeline state.
Episode 19 brings you into production-ready mode: diagnosis and restart runbooks, snapshot restart and replay procedures, incident response for lag and schema, config and offset backups, and recovery drills that test the plan for real.
The key takeaways:
In the next episode, episode 20, we'll discuss real-world use cases and patterns — microservice synchronization, analytics pipelines, CDC-based caches, event sourcing and audit logs, read scaling, and end-to-end architecture.