🦣 Mammoth is a self-hosted PostgreSQL event relay focused on reliable delivery of database change events.
PostgreSQL
↓
CDC Ecosystem source adapter
↓
CDC::Core::TransactionEnvelope
↓
Mammoth
↓
Webhook
🦣 Mammoth is intentionally boring infrastructure. It uses YAML configuration, JSON Schema validation, local SQLite operational state, and the CDC Ecosystem's shared vocabulary so operators can inspect, recover, and reason about delivery.
Documentation site:
https://kanutocd.github.io/mammoth/
API documentation:
https://kanutocd.github.io/mammoth/Mammoth.html
🦣 Mammoth OSS includes:
- CLI foundation
- YAML configuration loading
- JSON Schema-backed configuration validation
- SQLite operational memory bootstrap
- checkpoint persistence
- dead letter persistence
- webhook delivery sink
- delivery worker with retry, checkpoint, and DLQ handling
- CDC-core event serialization boundary
- CDC Ecosystem source-adapter integration boundary
- Docker image support
- public Helm chart support
- unit and e2e test tasks
Mammoth begins at CDC-core work items and ends at webhook delivery.
Mammoth does not own pgoutput protocol parsing, value decoding, source normalization, ordering policy, or runtime execution. Those belong to the upstream CDC Ecosystem components.
Mammoth configuration is YAML-backed and IDE-friendly.
# yaml-language-server: $schema=./mammoth.schema.jsonValidate configuration:
bundle exec ./exe/mammoth validate config/mammoth.example.ymlbundle exec ./exe/mammoth version
bundle exec ./exe/mammoth validate config/mammoth.example.yml
bundle exec ./exe/mammoth bootstrap config/mammoth.example.yml
bundle exec ./exe/mammoth status config/mammoth.example.yml
bundle exec ./exe/mammoth start config/mammoth.example.ymlDeliver a single normalized event JSON file through Mammoth's delivery path:
bundle exec ./exe/mammoth deliver-sample \
examples/postgres_webhook/config/mammoth.yml \
examples/postgres_webhook/events/order_insert.jsonMammoth stores operational memory in SQLite:
schema_migrationscheckpointsdead_letters
Mammoth scales downstream delivery throughput using the cdc-concurrent runtime while maintaining a single PostgreSQL logical replication stream.
Environment:
- 10,000 transactions
- 4 events per transaction
- 40,000 total events
| Concurrency | Transactions/sec |
|---|---|
| 1 | 96.50 |
| 25 | 2419.65 |
| Concurrency | Transactions/sec |
|---|---|
| 1 | 19.85 |
| 25 | 495.11 |
Observed throughput improved from:
- 96.50 → 2419.65 transactions/sec (10ms sink latency)
- 19.85 → 495.11 transactions/sec (50ms sink latency)
when increasing delivery concurrency from 1 to 25.
The benchmark demonstrates near-linear scaling of delivery throughput without increasing PostgreSQL replication connections.
See:
- docs/BENCHMARKS.md
- examples/transaction_webhook
For full benchmark methodology and results see:
See Benchmarks.
bundle exec rake test:e2e
# or
script/test-e2eThe e2e task uses a real HTTP receiver, real SQLite database, and real filesystem paths.
The public Helm chart lives under:
charts/mammoth
Install example:
helm install mammoth charts/mammothThe chart uses one replica and Recreate strategy to respect PostgreSQL's
logical replication slot constraint: one slot, one active subscriber.
Mammoth OSS is licensed under the MIT License.