v0.1.0 • MIT Open Source • Cloud & Self-Hosted

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.

At-least-once deliveryAES-256-GCM at restMCP native
checkout.service.ts· @kestrelmq/sdk
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",
});
Live delivery trace
DELIVERED
POST /v1/events
202 Accepted9 ms

Schema validated · Idempotency-Key locked · Enqueued to BullMQ

Worker · Sign & Dispatch
HMAC-SHA256
X-KestrelMQ-Signature: v1=9c4e2b8f01d7a63e54c2b8910fe34a19
https://api.acme.com/webhooks/orders
DELIVERED23.4 ms

200 OK · delivery_attempts[0] persisted with [REDACTED] secrets

CORE ARCHITECTURE

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.

node dist/main.js
API gateway · stateless
Redis · BullMQ
deliveries + deliveries-dlq
node dist/worker.js
workers · concurrency 10
Jittered backoff:10s1m5m30m2h

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.

STRICTWARNDISABLED
400 · errors.kestrelmq.dev/bad-request

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.

PAUSED (Buffering: 42)max_rate_per_sec: 10

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.

AES-256-GCMSHA-256 API KeysArgon2idHMAC-SHA256"[REDACTED]"
PIPELINE WALKTHROUGH

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.

1

Ingest (<10ms)

API key auth, Ajv JSON Schema check, Idempotency-Key lock, and transactional PostgreSQL insert — responds 202 Accepted without blocking.

202 AcceptedIdempotency-Key
2

Route & Render

Wildcard and JsonLogic rules fan out to matched integrations; Handlebars templates render channel bodies or pass BYOT payload.html.

order.*JsonLogic · Handlebars
3

Sign & Deliver

Isolated BullMQ worker decrypts AES-256-GCM credentials in memory, computes HMAC-SHA256 signature, and dispatches with a strict 10s timeout.

X-KestrelMQ-Signature10s timeout
4

Audit & DLQ

Every attempt is recorded in delivery_attempts with [REDACTED] secrets; transient 429/5xx retry with jitter before landing in deliveries-dlq.

delivery_attemptsDLQ Replay
NATIVE MCP SERVER

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.

.mcp.json
{
  "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.

6 tools · 2 resources · Streamable HTTP
Agent session
MCPStreamable HTTP

“Check the order.paid schema, send a test event, and inspect the webhook delivery attempt.”

kestrelmq://schemas
MCP resource
Matched contract order.paid · variables: [amount, orderId]STRICT
send_event
workspace-scoped

{ "event": "order.paid", "payload": { "orderId": "ord_9001", "amount": 149.99 } }

202 Accepted · eventId 01937a84-6c21... · enqueued 9bafef5c-41d2...
inspect_delivery
workspace-scoped

{ "deliveryId": "9bafef5c-41d2-4e89-9a0b-3c14d78e02f1" }

Attempt #1 · 200 OK in 23.4ms · sensitive headers [REDACTED]DELIVERED
send_eventwrite

Enqueue an outbound event; matching routing rules fan out into deliveries. Supports idempotencyKey.

list_deliveriesread

List recent deliveries, newest first, with keyset cursor pagination.

inspect_deliveryread

Fetch one delivery with its event, integration, rule and masked attempt timeline.

replay_deliverywrite

Reset a FAILED delivery to PENDING and re-enqueue it with a fresh retry budget.

get_analytics_summaryread

Totals, per-status counts, success rate and avg / p95 attempt duration over a window.

toggle_inbound_sourcewrite

Pause an inbound source to buffer webhooks without loss, or resume and drain at max_rate_per_sec.

kestrelmq://schemas

Event names with validation mode, payload variables and JSON Schema. Read before send_event.

kestrelmq://templates

Notification templates with Handlebars variables and the routing rules that use them.

EXTENSIBLE CONNECTOR ECOSYSTEM

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.

Growing registry • Modular driver architecture

Webhook HTTP

Webhook

Any HTTPS endpoint with HMAC-SHA256 timestamped signatures, custom headers, and per-rule targetOverride.

X-KestrelMQ-SignaturetargetOverride
Active · Outbound HTTP

Email Mailgun

Email

Transactional email delivery through Mailgun REST API with Handlebars subject/body templates or raw payload.html.

Mailgun RESTBYOT HTML
Active · Mailgun driver

Telegram Bot API

Telegram

Real-time operational notifications and chat alerts via Telegram Bot API sharing the same retry budget and DLQ.

Bot APIchat_id routing
Active · Telegram driver

Stripe / Shopify / GitHub Inbound

Signed inbound webhook gateways verified over the raw request body with pause/resume buffering and rate-controlled drain.

StripeShopifyGitHub
Active · Preset & Custom HMAC

+ 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>;
}
WHY KESTRELMQ

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.

CapabilityDIY BullMQClosed-Source Webhook SaaSKestrelMQ
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
CLOUD PRICING

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

FREE
$0/ month

Everything you need to wire up your first events.

  • 10,000 deliveries / month
  • 60 req / min rate limit
  • 7-day delivery history retention
  • 1 workspace
Start for free

Pro

PRO
$29/ month · billed yearly

Higher 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
Get Pro

Self-Hosted · MIT Open Source

Run KestrelMQ on your own Docker or Kubernetes stack with no quotas and no license fees.

Self-hosting docs
FAQ

Questions, answered.

Do failed retries count against my monthly quota?
No. Only successfully completed deliveries count toward your monthly allowance (10,000 on Free, 500,000 on Pro). Retries, 429/5xx responses and deliveries that end in the dead-letter queue are never billed.
What does at-least-once delivery mean, and how does Idempotency-Key fit in?
Every accepted event (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)?
Yes. Cloud and Self-Hosted run the same REST endpoints, JSON Schema contracts, Handlebars templates and signature format, so switching is a base URL and API key change. Self-hosting is MIT licensed with no quotas or license fees; start with the Docker quickstart.
How do billing, cancellation and refunds work?
Pro is $39 / month, or $29 / month billed yearly. Payments are handled by our merchant of record, Polar. Cancel any time and keep Pro until the end of the paid period. New Pro subscriptions can be refunded in full within 14 days; details are in the refund policy. Questions? Email support@kestrelmq.dev.
What happens if I go over my plan?
Free workspaces are capped at 10,000 deliveries / month. Pro includes 500,000 and adds $8 per extra 100k. Separately, requests above your rate limit (60 or 3,000 per minute) receive 429 with a Retry-After header.