FlashSend is a Go-based distributed notification delivery system designed to reliably send SMS, Email, and scheduled notifications at scale. It uses a RabbitMQ-powered asynchronous worker architecture with retries, dead-letter queues (DLQ), DB-backed scheduling, and automatic SMS provider failover (Twilio → Vonage) to guarantee delivery even during traffic spikes and third-party outages.

- Send SMS and Email notifications
- Schedule notifications for future delivery
- RabbitMQ asynchronous processing
- Exponential retry pipelines
- Dead Letter Queues (DLQ) for fault isolation
- Automatic SMS provider failover (Twilio → Vonage)
- Horizontally scalable distributed workers
- JWT authentication & API-key based access
- PostgreSQL-backed persistence
- Status-driven notification lifecycle
- Human-readable 24-hour time scheduling
Client → API (Gin) → RabbitMQ Queue → Distributed Workers → Providers (SMS/Email)
↘ DLQ (failed messages)
Scheduled notifications are stored in PostgreSQL and scanned by a cron-like scheduler built using Go’s time.Ticker.
| Layer | Technology |
|---|---|
| Language | Go |
| API Framework | Gin |
| Queue | RabbitMQ |
| Database | PostgreSQL |
| SMS Providers | Twilio, Vonage |
| Auth | JWT |
| Scheduler | Goroutines + time.Ticker |
queued → processing → retrying → sent → dead
Retries use exponential backoff. Notifications that exceed retry limits are routed to DLQ.
git clone https://github.com/TanishValesha/FlashSend-Notifier
cd FlashSend-NotifierCreate a .env file:
BIND_ADDR=:8080
JWT_SECRET=your-jwt-secret
APIKEY_HMAC_SECRET=your-apikey-secret
JWT_EXPIRATION_HOURS=24
DATABASE_URL=postgres://user:password@localhost:5432/flashsend?sslmode=disable
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_EMAIL=your-email@gmail.com
SMTP_APP_PASSWORD=your-smtp-app-password
TWILIO_ACCOUNT_SID=your_twilio_sid
TWILIO_AUTH_TOKEN=your_twilio_auth_token
TWILIO_PHONE_NUMBER=your_twilio_phone
VONAGE_API_KEY=your_vonage_api_key
VONAGE_API_SECRET=your_vonage_api_secret
VONAGE_FROM=FlashSenddocker-compose up -d postgres rabbitmqgo run ./cmd/server/main.gogo run ./cmd/worker/main.goPOST /api/auth/register
{
"email": "user@example.com",
"password": "password123"
}Response
{
"message": "User registered successfully"
}POST /api/auth/login
{
"email": "user@example.com",
"password": "password123"
}Response
{
"token": "<jwt-token>"
}POST /api/apikeys
Response
{
"key": "fs_98af3c1..."
}GET /api/apikeys
DELETE /api/apikeys/:id
POST /api/notify/send
{
"channel": "sms",
"to": "+919999999999",
"subject": "optional for email",
"body": "Hello from FlashSend"
}Response
{
"message": "Notification queued",
"id": 12
}POST /api/notify/schedule
{
"channel": "sms",
"to": "+919999999999",
"subject": "optional",
"body": "Reminder",
"scheduleAt": "2025-02-20 18:30"
}Response
{
"message": "Scheduled notification created",
"id": 34
}GET /api/notifications
GET /api/notifications/:id
GET /ping
FlashSend demonstrates real-world distributed systems design patterns such as:
- Competing consumer worker pools
- Queue-based backpressure handling
- Fault-tolerant retry pipelines
- Scheduled job orchestration
- Provider failover and resiliency design