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 endpointsSetup
The event pipeline requires additional Docker services. Start with: make up-rabbit
1. Start RabbitMQ
make up-rabbitThis 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
- Create a webhook endpoint (via dashboard or API)
- Create a customer
- Check delivery history — you should see a
CUSTOMER_CREATIONevent
PostgreSQL WAL Configuration
The database must have logical replication enabled:
wal_level = logical
max_replication_slots = 4
max_wal_senders = 4The 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.

