Create a CockroachDB changefeed that streams row changes to a Kafka topic

domain: cockroachlabs.com · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Ensure the cluster has the `kv.rangefeed.enabled` cluster setting set to true: `SET CLUSTER SETTING kv.rangefeed.enabled = true;`
  2. Create an enterprise changefeed targeting a Kafka broker: `CREATE CHANGEFEED FOR TABLE orders INTO 'kafka://BROKER_HOST:9092?topic_prefix=crdb_' WITH updated, resolved='10s';`
  3. The `updated` option includes a timestamp on each row; `resolved` emits periodic resolved timestamps to the topic so consumers can track progress.
  4. In your Kafka consumer, deserialize the JSON payload — each message contains the row data plus a `__crdb__` metadata field with the commit timestamp.
  5. Monitor changefeed status and lag: `SHOW CHANGEFEED JOBS;` and check `high_water_timestamp` against current time.

Known gotchas

Related routes

Create a ksqlDB stream and table from Kafka topics
docs.confluent.io · 6 steps · unrated
Configure Kafka Streams to handle topology changes between versions using a state store migration and changelog topic rebuild strategy
kafka.apache.org · 5 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans