A webhook delivery system using BullMQ and Redis to process HTTP delivery jobs asynchronously with automatic retries on failure.
- Accepts webhook delivery requests and responds instantly with a job ID
- Processes actual HTTP delivery in the background via a BullMQ worker
- Automatically retries failed deliveries 3 times with exponential backoff
- All traffic routed through NGINX — NestJS is not exposed directly
- Node.js
- Docker
npm install
docker compose up --buildDeliver a webhook
POST /webhooks/deliver
{
"url": "https://your-endpoint.com/webhook",
"payload": {
"event": "message.sent",
"data": {}
}
}Returns immediately:
{ "success": true, "jobId": "1" }Delivery happens in the background. If it fails, BullMQ retries 3 times with exponential backoff — 1s, 2s, 4s.
HTTP Client
↓
NGINX (port 80) — sole entry point
↓
NestJS (ValidationPipe)
↓
WebhooksService → BullMQ Queue (Redis)
↓
QueueProcessor (Worker)
↓
HTTP POST to target URL
(retries on failure)
- NestJS
- BullMQ
- ioredis
- Docker + Docker Compose
- NGINX