A simple BullMQ worker to process prioritized items from a Redis queue.
- ✅ Simple BullMQ worker setup
- ✅ Redis connection with configurable host/port
- ✅ Priority queue processing
- ✅ Concurrent job processing (up to 5 jobs)
- ✅ Graceful shutdown handling
- ✅ Comprehensive logging
pnpm installCreate a .env file in the project root with your Redis URL:
# .env file
REDIS_URL=redis://localhost:6379
# or with password: redis://:password@localhost:6379
# or with auth: redis://username:password@localhost:6379Alternatively, you can set the environment variable directly:
export REDIS_URL=redis://localhost:6379Start the worker:
pnpm startFor development with auto-restart:
pnpm run devPress Ctrl+C to gracefully shutdown the worker.