Queue Driver Configuration Analyzer
| Analyzer ID | Category | Severity | Time To Fix |
|---|---|---|---|
queue-driver | ⚡ Performance | Medium | 30 minutes |
What This Checks
Ensures Laravel's queue driver is configured for reliability and performance - Redis or SQS for production, avoiding sync driver that blocks requests.
Why It Matters
- Performance: Sync driver blocks requests until jobs complete
- Reliability: Null driver silently discards jobs
- Scalability: Proper drivers enable horizontal scaling
The sync driver processes jobs immediately in the same request, blocking the user. The null driver discards jobs entirely. Both are unsuitable for production.
How to Fix
Quick Fix (5 minutes)
ini
# .env
QUEUE_CONNECTION=redisProper Fix (30 minutes)
Redis:
bash
sudo apt-get install redis-server
composer require predis/predisAWS SQS:
bash
composer require aws/aws-sdk-phpini
QUEUE_CONNECTION=sqs
AWS_ACCESS_KEY_ID=your-key
AWS_SECRET_ACCESS_KEY=your-secret
AWS_DEFAULT_REGION=us-east-1
SQS_QUEUE=your-queue-urlStart Workers:
bash
php artisan queue:work redis --tries=3ShieldCI Configuration
This analyzer is automatically skipped in CI environments ($runInCI = false).
Why skip in CI?
- Queue backends (Redis, SQS) are typically unavailable in CI pipelines
- CI environments commonly use the
syncordatabasedriver for simplicity, which would trigger false warnings - Driver choice is a deployment concern, not a code-correctness concern that CI should gate on
Testing environment note: When APP_ENV=testing, the database driver warning is also suppressed at the check level — testing is treated the same as local for this driver.
When to run this analyzer:
- ✅ Local development: Ensures your queue driver is set up for realistic job processing
- ✅ Staging/Production servers: Confirms a production-grade driver (Redis, SQS) is configured
- ❌ CI/CD pipelines: Skipped automatically (queue backends typically unavailable)
References
Related Analyzers
- Cache Driver Configuration Analyzer - Ensures a proper cache driver configuration for optimal performance
- Horizon Suggestion Analyzer - Recommends using Laravel Horizon when Redis queues are configured