Unified Delivery Pipeline for Webhooks, Email, Chat & Custom Adapters.
Open-source webhook & event delivery infrastructure: one ingestion API, a pluggable driver layer for every outbound channel, and a signed inbound gateway for any provider. Guaranteed at-least-once delivery on NestJS, PostgreSQL 18, BullMQ and native MCP tools.
import { KestrelClient } from "@kestrelmq/sdk";
const kestrel = new KestrelClient({
baseUrl: process.env.KESTRELMQ_BASE_URL!,
apiKey: process.env.KESTRELMQ_API_KEY!,
});
const receipt = await kestrel.events.send({
event: "order.paid",
payload: { orderId: "ord_9001", amount: 149.99 },
idempotencyKey: "order-paid-ord_9001",
});Schema validated · Idempotency-Key locked · Enqueued to BullMQ
200 OK · delivery_attempts[0] persisted with [REDACTED] secrets
Built like infrastructure, not a connector you can't swap.
Four operational guarantees that carry every event from your backend to any destination — and every third-party webhook safely back in, whichever provider signed it.
Isolated BullMQ Workers
Strict API vs. worker separation: the stateless HTTP gateway validates, persists, and enqueues in under 10ms without ever making an outbound network call. Isolated BullMQ workers execute adapters, retry transient 429/5xx with jittered backoff, and route exhausted jobs to deliveries-dlq.
Schema Validation STRICT / WARN
Versioned JSON Schema contracts compiled with Ajv and cached in Redis. Reject malformed payloads before queue ingress in STRICT mode with RFC 9457 application/problem+json, or log drift safely in WARN mode during migrations.
HMAC Ingress Buffering
Verify upstream webhook signatures over raw request bytes — Stripe, Shopify, GitHub, or custom HMAC — then pause forward delivery during deploys and drain buffered events smoothly at max_rate_per_sec.
AES-256-GCM Credential Vault
Adapter tokens, SMTP credentials, and signing secrets are sealed at rest with AES-256-GCM. Workspace API keys store only SHA-256 digests, passwords use Argon2id, and recursive redaction masks sensitive fields before any audit row touches disk.
From one POST to a signed, audited delivery.
Every event walks the same four stages. Each stage is observable, replayable, and isolated from the one before it.
Ingest (<10ms)
API key auth, Ajv JSON Schema check, Idempotency-Key lock, and transactional PostgreSQL insert — responds 202 Accepted without blocking.
Route & Render
Wildcard and JsonLogic rules fan out to matched integrations; Handlebars templates render channel bodies or pass BYOT payload.html.
Sign & Deliver
Isolated BullMQ worker decrypts AES-256-GCM credentials in memory, computes HMAC-SHA256 signature, and dispatches with a strict 10s timeout.
Audit & DLQ
Every attempt is recorded in delivery_attempts with [REDACTED] secrets; transient 429/5xx retry with jitter before landing in deliveries-dlq.
Your delivery pipeline, operable by AI agents.
A stateless Streamable HTTP server at /mcp exposes workspace-isolated tools and schema discovery resources to Claude Code and Cursor — behind the same API key guard and rate limit as REST.
{
"mcpServers": {
"kestrelmq": {
"type": "http",
"url": "https://api.kestrelmq.dev/mcp",
"headers": {
"Authorization": "Bearer ${KESTRELMQ_API_KEY}"
}
}
}
}KestrelMQ Cloud endpoint. Create a workspace API key in the dashboard.
“Check the order.paid schema, send a test event, and inspect the webhook delivery attempt.”
{ "event": "order.paid", "payload": { "orderId": "ord_9001", "amount": 149.99 } }
{ "deliveryId": "9bafef5c-41d2-4e89-9a0b-3c14d78e02f1" }
Enqueue an outbound event; matching routing rules fan out into deliveries. Supports idempotencyKey.
List recent deliveries, newest first, with keyset cursor pagination.
Fetch one delivery with its event, integration, rule and masked attempt timeline.
Reset a FAILED delivery to PENDING and re-enqueue it with a fresh retry budget.
Totals, per-status counts, success rate and avg / p95 attempt duration over a window.
Pause an inbound source to buffer webhooks without loss, or resume and drain at max_rate_per_sec.
Event names with validation mode, payload variables and JSON Schema. Read before send_event.
Notification templates with Handlebars variables and the routing rules that use them.
Connector-agnostic by design.
Channels are drivers behind one interface. Ship with built-in outbound and inbound providers, swap credentials without touching product code, or register your own adapter.
Webhook HTTP
Any HTTPS endpoint with HMAC-SHA256 timestamped signatures, custom headers, and per-rule targetOverride.
Email Mailgun
Transactional email delivery through Mailgun REST API with Handlebars subject/body templates or raw payload.html.
Telegram Bot API
Real-time operational notifications and chat alerts via Telegram Bot API sharing the same retry budget and DLQ.
Stripe / Shopify / GitHub Inbound
Signed inbound webhook gateways verified over the raw request body with pause/resume buffering and rate-controlled drain.
+ Custom Adapter
Implement the NotificationProvider interface, register it with ProviderFactory, and your driver automatically inherits retries, jittered backoff, DLQ, templating, and masked audit logs.
interface NotificationProvider {
send(ctx: DeliveryContext):
Promise<ProviderResult>;
}Own the pipeline without building it.
A raw queue gives you primitives. A closed SaaS gives you a vendor. KestrelMQ gives you the finished delivery pipeline under an MIT license.
| Capability | DIY BullMQ | Closed-Source Webhook SaaS | KestrelMQ |
|---|---|---|---|
| License & hosting | Your code, your servers, your maintenance | Proprietary, vendor-hosted only | MIT Open Core · Cloud or self-hosted |
| Outbound webhooks | Build signing, retries and DLQ yourself | Included | HMAC-SHA256 signing, jittered backoff, DLQ replay |
| Inbound gateway | Build per-provider signature checks | Varies by vendor | Stripe, Shopify, GitHub or custom HMAC with pause & buffer |
| Email & chat in the same pipeline | Write and operate each adapter | Typically webhooks only | Webhook, Mailgun email and Telegram share one retry budget |
| Native MCP for AI agents | None | Rarely | 6 tools and 2 resources at /mcp |
| Leaving later | You already own it | Re-implement against another API | Same API on Cloud and self-hosted, no code changes |
Simple cloud pricing. Self-host it free, forever.
Two managed plans, no sales calls. Failed retries never count against your monthly delivery quota — you only pay for events that actually deliver.
Free
FREEEverything you need to wire up your first events.
- 10,000 deliveries / month
- 60 req / min rate limit
- 7-day delivery history retention
- 1 workspace
Pro
PROHigher throughput, longer history, and DLQ tooling for production workloads.
- 500,000 deliveries / month + $8 per extra 100k
- 3,000 req / min rate limit
- 30-day delivery history retention
- Up to 5 workspaces
- DLQ alerts & bulk replay
Self-Hosted · MIT Open Source
Run KestrelMQ on your own Docker or Kubernetes stack with no quotas and no license fees.
Questions, answered.
Do failed retries count against my monthly quota?
What does at-least-once delivery mean, and how does Idempotency-Key fit in?
202 Accepted) is delivered at least once, so a timeout or 5xx after the payload was sent can cause a retry and a duplicate. Send an Idempotency-Key on ingest to make your own retries safe: a repeated key within 24 hours returns the original event instead of creating a new one. On the receiving side, verify X-KestrelMQ-Signature and de-duplicate on X-KestrelMQ-Delivery-Id.Can I move from Cloud to Self-Hosted later (or the other way)?
How do billing, cancellation and refunds work?
What happens if I go over my plan?
429 with a Retry-After header.