Kaiten
Self-Hosting

Event Pipeline

Set up the full event pipeline with RabbitMQ, Debezium, Dapr, and Svix.

Event Pipeline

The event pipeline is an optional add-on that enables webhook delivery. Without it, domain events are still recorded in the outbox table but not delivered externally.

Architecture

PostgreSQL (outbox_events table)
  │  WAL Logical Replication

Debezium CDC Connector
  │  Captures INSERT on outbox_events

RabbitMQ (exchange: kaiten.events)
  │  Fanout to queues

Dapr Sidecar (pubsub component)
  │  HTTP POST to worker endpoint

Kaiten Webhooks Worker
  │  Parses CDC envelope, calls Svix

Svix → Your webhook endpoints

Setup

The event pipeline requires additional Docker services. Start with: make up-rabbit

1. Start RabbitMQ

make up-rabbit

This starts: RabbitMQ, Debezium, and Dapr sidecar.

2. Configure Svix

Set the Svix API key in your .env:

SVIX_API_KEY=eyJhbGciOiJIUzI1NiJ9...

You can use Svix Cloud or self-host Svix.

3. Verify the Pipeline

  1. Create a webhook endpoint (via dashboard or API)
  2. Create a customer
  3. Check delivery history — you should see a CUSTOMER_CREATION event

PostgreSQL WAL Configuration

The database must have logical replication enabled:

wal_level = logical
max_replication_slots = 4
max_wal_senders = 4

The Kaiten compose.yml already configures this via Docker command arguments.

Debezium Connector

Debezium watches the outbox_events table and forwards new rows to RabbitMQ. The connector is configured automatically by the seeder/migration process.

On this page