ABOUT KESTRELMQ

Open-core event routing built like durable infrastructure.

KestrelMQ is a multi-tenant notification orchestration and guaranteed webhook delivery control plane. Emit one structured domain event from your application — KestrelMQ handles schema contracts, fan-out routing, cryptographic signing, exponential retries, dead-letter recovery, and AI agent observability.

MIT LicenseOpen Core · Zero TelemetryPostgreSQL · Redis · BullMQMCPStreamable HTTP
dmereiauron/kestrelmq

Core NestJS gateway, isolated BullMQ workers, AES-256-GCM credential vault, inbound webhook gateways, Docker Compose stack, and MCP server source code.

GitHub RepositoryMIT License
@kestrelmq/sdk

Zero-dependency, strictly typed ESM TypeScript SDK built on native fetch for single & streaming CSV ingestion, delivery inspection, replay, and RFC 9457 error handling.

npm RegistryZero runtime dependencies

Why we built KestrelMQ

Engineering teams repeatedly rebuild the same fragile notification plumbing inside product monoliths: synchronous HTTP calls that spike tail latency, ad-hoc retry loops without jitter, unencrypted API tokens scattered across environment variables, and zero visibility when a customer's webhook endpoint goes down during a deploy. Existing SaaS alternatives solve delivery only by locking routing logic, templates, and audit logs inside proprietary clouds priced by seat or retry volume.

KestrelMQ treats event delivery as auditable, portable systems infrastructure. Whether you run a single Docker Compose stack on your own VPC or use Managed Cloud for zero-maintenance operations, every event follows deterministic schema contracts, cryptographic signing, and full attempt-level traceability.

MIT LICENSED CORE

Permissive Open Core, never crippled

The KestrelMQ event gateway, BullMQ delivery workers, AES-256-GCM vault, inbound HMAC gateway, @kestrelmq/sdk client, and MCP server are released under the MIT License. Security primitives, schema validation, and dead-letter recovery belong in the open foundation — never behind an enterprise paywall.

PORTABILITY

Zero vendor lock-in by contract

Managed Cloud and Self-Hosted deployments run the exact same REST endpoints (/v1/*), JSON Schema contracts, Handlebars templates, and X-KestrelMQ-Signature wire format backed by standard PostgreSQL and Redis. Switching between Cloud and your own cluster is a single baseUrl environment variable change.

SYSTEM DESIGN

Core event-routing & MCP architecture

KestrelMQ separates high-throughput HTTP ingestion from outbound provider execution and exposes the entire workspace control plane to both human operators and Model Context Protocol (MCP) agents.

01

Stateless HTTP Gateway (<10ms p99)

Authenticates workspace SHA-256 API keys, enforces Redis sliding-window quotas, acquires 24-hour Idempotency-Key locks, validates payloads against compiled Ajv JSON Schemas (STRICT, WARN, or DISABLED), commits the event and matched deliveries in one PostgreSQL transaction, and returns 202 Accepted with zero synchronous outbound I/O.

POST /v1/eventsAjv JSON Schema202 Accepted
02

Declarative Fan-Out & Inbound Buffering

Wildcard event patterns (e.g. order.*) and JsonLogic filter predicates fan one domain event out across Webhook HTTP, Mailgun Email, and Telegram Bot adapters simultaneously. On the ingress side, signed Stripe, Shopify, GitHub, and custom HMAC gateways verify raw bytes and support pause/resume maintenance buffering at max_rate_per_sec.

JsonLogic RulesHandlebars / BYOTHMAC Ingress
03

Isolated BullMQ Workers & DLQ Recovery

Horizontally scalable worker processes consume from the deliveries queue, unseal AES-256-GCM credentials strictly in memory, sign outbound webhooks with HMAC-SHA256, enforce DNS-pinned SSRF guards and 10s timeouts, retry transient 429/5xx failures with jittered backoff, and route exhausted jobs to deliveries-dlq for one-click or SDK replay.

BullMQ WorkersJittered Backoffdeliveries-dlq
04

Native Streamable HTTP MCP Server

Mounted natively at /mcp behind the same workspace API key guard and rate limiter, KestrelMQ exposes 6 strict Zod-validated tools (send_event, list_deliveries, inspect_delivery, replay_delivery, get_analytics_summary, toggle_inbound_source) and 2 discovery resources (kestrelmq://schemas, kestrelmq://templates) to Claude Code, Cursor, and SRE agents.

POST /mcp6 Agent Toolskestrelmq://schemas

One engine, two deployment modes

SELF-HOSTED MITMANAGED CLOUD

Self-hosted instances contain zero phone-home telemetry and give you complete custody of your PostgreSQL, Redis, and ENCRYPTION_MASTER_KEY secrets. Managed Cloud runs the identical container images with automated backups, managed TLS, sliding-window rate protection, and zero-config onboarding — where failed delivery retries never count against your monthly quota.

RELATED TRUST & LEGAL PAGES