Download the PHP package campelo/laravel-queue-control without Composer
On this page you can find all versions of the php package campelo/laravel-queue-control. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel-queue-control
Laravel Queue Control
Operational control for Laravel queues. Cancel jobs, clear queues, pause workers, and manage campaigns with ease.
Horizon vs Queue Control
| Laravel Horizon | Queue Control | |
|---|---|---|
| Focus | Observability | Operational Control |
| Monitors queues | Yes | Yes |
| Shows metrics | Yes | Yes |
| Cancel pending jobs | No | Yes |
| Cancel by campaign | No | Yes |
| Cancel by job type | No | Yes |
| Clear queues | No | Yes |
| Pause/Resume workers | No | Yes |
Use Horizon to watch. Use Queue Control to act.
The Problem
You dispatched 15,000 email jobs for a newsletter. Then you realized the email content was wrong. With Horizon, you can only watch them go out. With Queue Control:
Done. All pending jobs cancelled.
Requirements
- PHP 8.1+
- Laravel 10.x or 11.x
- Redis or Database queue driver
Installation
Publish and migrate:
Quick Start
1. Add the trait to your jobs
2. Dispatch with campaign ID
3. Cancel when needed
Key Features
Campaigns
Campaigns let you group different job types semantically:
This is more powerful than batches because:
- Groups multiple job types
- Semantic naming (meaningful IDs)
- Closer to real-world operations
Queue Pause/Resume
Dashboard
Access at /queue-control:
- Real-time queue statistics
- Job success/failure rates
- Campaign monitoring
- Queue controls
Configuration
Environment Variables
Artisan Commands
Using the Facade
Granular Permissions
Queue Control supports fine-grained access control:
Works with:
- User IDs:
[1, 2, 3] - Roles:
['admin', 'ops'](requires Spatie Permissions or similar) - Gates: Define
queue-control.pause,queue-control.cancel, etc.
How It Works
Job Cancellation
- When you cancel, the ID is stored in cache (fast) and database (persistent)
- Before each job runs,
Queue::beforechecks if it's cancelled - Cancelled jobs are deleted without executing
Queue Pausing
- Pause sets a flag in cache
- Workers release jobs back to queue with delay
- Jobs are held, not lost
- Resume removes the flag
API Endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/queue-control/dashboard |
Dashboard stats |
| GET | /api/queue-control/queues |
List queues |
| POST | /api/queue-control/queues/{queue}/clear |
Clear queue |
| POST | /api/queue-control/queues/{queue}/pause |
Pause queue |
| POST | /api/queue-control/queues/{queue}/resume |
Resume queue |
| POST | /api/queue-control/jobs/cancel |
Cancel by UUID |
| POST | /api/queue-control/jobs/cancel-by-class |
Cancel by class |
| GET | /api/queue-control/metrics |
Job metrics |
| GET | /api/queue-control/batches |
List batches |
| POST | /api/queue-control/batches/{id}/cancel |
Cancel batch |
Cleanup
Schedule cleanup to remove old records:
License
MIT License. See LICENSE for details.
All versions of laravel-queue-control with dependencies
illuminate/contracts Version ^10.0|^11.0
illuminate/queue Version ^10.0|^11.0
illuminate/support Version ^10.0|^11.0
illuminate/redis Version ^10.0|^11.0