Download the PHP package ccarver/queue-watcher-laravel without Composer
On this page you can find all versions of the php package ccarver/queue-watcher-laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ccarver/queue-watcher-laravel
More information about ccarver/queue-watcher-laravel
Files in ccarver/queue-watcher-laravel
Package queue-watcher-laravel
Short Description Laravel integration for the queue-watcher Go package — emits job telemetry over stdout as newline-delimited JSON.
License MIT
Informations about the package queue-watcher-laravel
queue-watcher-laravel
A Laravel package that integrates with the queue-watcher Go process. It hooks into Laravel's queue job lifecycle and emits newline-delimited JSON to stdout so queue-watcher can monitor jobs in real time. It also tracks sent emails to a database for inbox-style monitoring.
Requirements
- PHP 8.1+
- Laravel 10, 11, or 12
Installation
Laravel's auto-discovery will register the service provider automatically. No manual registration is needed.
Features
- Queue telemetry — emits job lifecycle events (reserved, completed, failed) as NDJSON to stdout for the queue-watcher Go process.
- Mail tracking — captures every sent email and stores it in the database so a monitoring service can display a full inbox view.
Configuration
Publish the config file if you need to override defaults:
This creates config/queue-watcher.php. Available env vars:
Queue telemetry
While php artisan queue:work is running, the package listens to Laravel's queue events and writes a JSON line to stdout for each job transition:
The queue-watcher Go process reads these lines from the worker's stdout pipe. Telemetry is only active during php artisan queue:work and is a no-op in web requests.
Mail tracking
Every email sent through Laravel's mailer is saved to the queue_watcher_mail database table. This works in all contexts — web requests and queue workers alike.
Setup
Publish and run the migration:
What is stored
Each record captures everything needed to render the email in an inbox view:
| Column | Description |
|---|---|
message_id |
SMTP Message-ID header |
subject |
Email subject |
sent_at |
Date from the message (RFC 2822) |
from |
Sender(s) as [{address, name}] |
reply_to |
Reply-to address(es) |
to |
Primary recipient(s) |
cc |
CC recipient(s) |
bcc |
BCC recipient(s) |
body_html |
HTML body |
body_text |
Plain-text body |
created_at |
When the record was inserted |
Pruning old records
Stored emails are automatically pruned using Laravel's built-in model pruning. Records older than prune_after_days (default: 7) are deleted when you run:
Schedule this in your application's routes/console.php (Laravel 11+) or App\Console\Kernel:
Set QUEUE_WATCHER_MAIL_PRUNE_DAYS=0 to disable pruning (records kept indefinitely).
Querying stored mail
Records are accessible via the WatchedMail Eloquent model:
Upgrading
v1.0.0 → v2.0.0
Version 2.0 adds mail tracking. No breaking changes to existing queue telemetry behaviour.
New dependency
illuminate/mail and illuminate/database are now required. These are included in a standard Laravel installation, so no extra steps are needed for most projects.
Run the new migration
This creates the queue_watcher_mail table. Existing tables are untouched.
Publish the updated config (optional)
If you previously published config/queue-watcher.php, re-publish or manually add the new mail block:
Schedule pruning (optional)
Add model:prune to your scheduler if you want old mail records cleaned up automatically — see Pruning old records.
License
MIT
All versions of queue-watcher-laravel with dependencies
illuminate/support Version ^10.0|^11.0|^12.0
illuminate/queue Version ^10.0|^11.0|^12.0
illuminate/mail Version ^10.0|^11.0|^12.0
illuminate/database Version ^10.0|^11.0|^12.0