cdc-debezium-rails

Configure Debezium CDC to stream Rails PostgreSQL changes to Kafka.

21|2|Updated May 24, 2026
One-click install
npx skills add https://github.com/sandeepmvl/rails-skills --skill cdc-debezium-rails
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cdc-debezium-rails
Source: https://github.com/sandeepmvl/rails-skills/tree/main/skills/46-cdc-debezium-rails
Command: npx skills add https://github.com/sandeepmvl/rails-skills --skill cdc-debezium-rails

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Manually keeping downstream systems like search indexes, data warehouses, and audit logs in sync with Rails database changes is error-prone and requires writing custom event emission code for every database write operation.

Core Features & Use Cases

  • Postgres Logical Replication Setup: Configures wal_level=logical, publications, replication slots, and REPLICA IDENTITY FULL to enable accurate change streaming.
  • Debezium Connector Configuration: Provides production-ready Kafka Connect configs with built-in transforms for clean event shapes and initial snapshot backfills.
  • Use Case Example: Automatically sync post updates to a search index without modifying your Rails application's core business logic.

Quick Start

Use the cdc-debezium-rails skill to configure Debezium CDC to stream all changes from your Rails Postgres database's posts table to a Kafka topic for real-time search index synchronization.

Frequently Asked Questions about cdc-debezium-rails

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I stream Rails PostgreSQL database changes to Kafka?

You can stream Rails PostgreSQL database changes to Kafka by configuring Postgres logical replication and deploying a Debezium connector to capture row-level mutations automatically without modifying application business logic.

What is change data capture and when do I need it for Rails?

Change data capture (CDC) is the process of tracking database row changes in real time. You need it for Rails workflows requiring search index backfills, cache invalidation, or cross-service data synchronization without writing custom event emission code.

How do I configure Postgres logical replication for Debezium?

To configure Postgres logical replication for Debezium, you must set wal_level=logical, create publications, define replication slots, and configure REPLICA IDENTITY FULL to ensure accurate change streaming for the connector.

Can I sync Rails database updates to a search index without modifying application code?

Yes, by using Debezium CDC to monitor the logical replication slot, database row changes are automatically published to Kafka topics, allowing downstream consumers to update search indexes without touching Rails business logic.

What is the outbox pattern in Debezium and how does it handle schema evolution?

The outbox pattern in Debezium provides semantic event routing for reliable data synchronization. Schema evolution handling ensures that downstream systems correctly interpret change events when database table structures change over time.

Does Debezium require REPLICA IDENTITY FULL for Postgres change data capture?

Yes, configuring REPLICA IDENTITY FULL is required for accurate change streaming in Postgres logical replication. It ensures Debezium captures complete before and after states for update and delete operations on tracked tables.