Feature
Description
💾 Durable Storage
BoltDB-backed persistence — jobs survive crashes and restarts
⚡ Priority Queues
Critical, High, Normal, Low, and Bulk priority levels
🔄 Smart Retries
Exponential, linear, or constant backoff strategies
📊 Observability
Prometheus metrics, structured logging, health checks
🛡️ Fault Tolerant
Panic recovery, checkpointing, graceful shutdown
🔐 Security Ready
API key auth, role-based authorization
🔗 Job Dependencies
Chain jobs with wait conditions
🆔 Idempotency
Built-in deduplication via idempotency keys
go install github.com/sa001gar/gopherqueue/cmd/gq@latest
gq serve # Default: 10 workers, port 8080
gq serve --http :8080 --workers 20 --data-dir ./data # Custom config
docker run -d --name gopherqueue -p 8080:8080 -v gq_data:/data sa001gar/gopherqueue:latest
# CLI
gq submit --type email --payload ' {"to": "user@example.com"}'
# HTTP API
curl -X POST http://localhost:8080/api/v1/jobs \
-H " Content-Type: application/json" \
-d ' {"type": "email", "payload": {"to": "user@example.com"}, "priority": 1}'
Use GopherQueue from any language with our official SDKs.
from gopherqueue import GopherQueueSync
queue = GopherQueueSync ("http://localhost:8080" )
job = queue .submit ("email" , {"to" : "user@example.com" })
print (f"Job { job .id } queued!" )
📜 TypeScript / JavaScript
import { GopherQueue } from "gopherqueue" ;
const queue = new GopherQueue ( "http://localhost:8080" ) ;
const job = await queue . submit ( "email" , { to : "user@example.com" } ) ;
console . log ( `Job ${ job . id } queued!` ) ;
┌─────────────┐
│ completed │
└─────────────┘
▲
│ success
┌─────────┐ ┌───────────┐ ┌─────────┴───┐
│ pending │───▶│ scheduled │───▶│ running │
└─────────┘ └───────────┘ └──────┬──────┘
│ failure
┌──────────────────┴──────────────────┐
▼ ▼
┌────────────┐ ┌──────────┐
│ retrying │ │ failed │
└────────────┘ └─────┬────┘
│
▼
┌─────────────┐
│ dead_letter │
└─────────────┘
State
Description
pending
Created, waiting to be scheduled
scheduled
In priority queue, ready for pickup
running
Worker actively processing
completed
Finished successfully
retrying
Failed, waiting for retry
failed
Exceeded max attempts
dead_letter
Permanently failed, needs manual intervention
Flag
Default
Description
--http
:8080
HTTP server address
--workers
10
Concurrent worker count
--data-dir
./data
BoltDB storage directory
--shutdown-timeout
30s
Graceful shutdown timeout
Priority
Value
Use Case
Critical
0
System alerts, payments
High
1
User-initiated actions
Normal
2
Standard background work
Low
3
Batch processing
Bulk
4
Data migrations
gopherqueue/
├── api/ # HTTP API handlers
├── cli/ # Command-line interface
├── cmd/gq/ # Main entry point
├── core/ # Core types & options
├── docs/ # Documentation
├── observability/ # Metrics & health
├── persistence/ # Storage (BoltDB)
├── scheduler/ # Priority queue
├── sdks/ # Python & TypeScript SDKs
├── security/ # Auth & authorization
└── worker/ # Job execution
Contributions welcome! Please read our Contributing Guide .
Fork the repository
Create your feature branch (git checkout -b feature/amazing-feature)
Commit your changes (git commit -m 'Add amazing feature')
Push to the branch (git push origin feature/amazing-feature)
Open a Pull Request
MIT License — see LICENSE .