Transactional outbox
A sweeper re-enqueues events lost to a crash or a Redis outage, using row claims with a lease so several instances never collide.
Open-source webhook reliability
Relay accepts signed events, stores them durably, delivers them asynchronously and retries transient failures with backoff. Duplicates and crashes never turn into duplicate business effects.
# signed request
x-relay-event-id: evt_123
x-relay-signature: 9f2c…b41e
# first delivery
{ "accepted": true, "duplicate": false }
# the provider retries the same event
{ "accepted": true, "duplicate": true }
Measured with the reproducible demo scenario: the receiver is down, every request is duplicated, then the receiver recovers.
How it works
Relay never blocks the incoming request on your downstream service, and never loses an event it has acknowledged.
HMAC-SHA256 over the raw body, compared in constant time. Invalid ids and signatures are rejected before storage.
The event is written to PostgreSQL with a unique id per source. Replays are recognised, not duplicated.
BullMQ delivers a signed request. Failures retry on a separate queue with exponential backoff and jitter.
Exhausted events land in a dead-letter queue you can inspect and retry manually.
Guarantees
Exactly-once delivery is impossible across a database, a queue and an HTTP service. Relay provides at-least-once delivery and makes repetition safe.
A sweeper re-enqueues events lost to a crash or a Redis outage, using row claims with a lease so several instances never collide.
Event ids are scoped per source. Duplicate requests are acknowledged and re-enqueued only if not yet delivered.
A dedicated delayed queue means a failing receiver never slows the delivery of new events.
Outbound requests are signed, time-limited and never follow redirects, so a receiver cannot stall a worker.
Status, HTTP code, error cause and duration for every attempt,
plus Prometheus metrics on /metrics.
Production refuses to start without strong secrets, and operator routes require an admin bearer token.
Quick start
You need Node.js 24.9 or later and Docker. The PostgreSQL schema is created automatically at startup.
Read the full documentationnpm ci
docker compose up -d
npm run start:dev
BODY='{"event":"payment.created","amount":4200}'
SIGNATURE=$(printf '%s' "$BODY" |
openssl dgst -sha256 -hmac dev-secret -hex |
sed 's/^.* //')
curl -i http://localhost:3000/webhooks/stripe \
-H 'content-type: application/json' \
-H 'x-relay-event-id: evt_123' \
-H "x-relay-signature: $SIGNATURE" \
--data "$BODY"
Honest by design
Relay is a single-tenant webhook relay, not a full webhook platform. Knowing the limits is part of using it well.
x-relay-event-id.
Open the live console, or run the reliability demo on your machine.
The demo runs on Render's free tier; the first request after a period of inactivity can take a moment.