PHPackages                             edwardtich/laravel-queue-monitor - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Queues &amp; Workers](/categories/queues)
4. /
5. edwardtich/laravel-queue-monitor

ActiveLibrary[Queues &amp; Workers](/categories/queues)

edwardtich/laravel-queue-monitor
================================

Queue Monitoring for Laravel Database Job Queue

1.1.4(10mo ago)0746MITPHPPHP ^8.0

Since Mar 21Pushed 10mo agoCompare

[ Source](https://github.com/edwardtich/Laravel-Queue-Monitor)[ Packagist](https://packagist.org/packages/edwardtich/laravel-queue-monitor)[ GitHub Sponsors](https://github.com/romanzipp)[ RSS](/packages/edwardtich-laravel-queue-monitor/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (8)Dependencies (12)Versions (13)Used By (0)

Laravel Queue Monitor
=====================

[](#laravel-queue-monitor)

[![Latest Stable Version](https://camo.githubusercontent.com/f209158e1faab983138a37858230d83bc60e0ba91c1bb2f4ea5675e753ce3935/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f726f6d616e7a6970702f6c61726176656c2d71756575652d6d6f6e69746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/romanzipp/laravel-queue-monitor)[![Total Downloads](https://camo.githubusercontent.com/daa41acf344a7714b3a3d786350312db3211ed88e8c79ea80ade4440ed00606a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f726f6d616e7a6970702f6c61726176656c2d71756575652d6d6f6e69746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/romanzipp/laravel-queue-monitor)[![License](https://camo.githubusercontent.com/12f704263f7178e807136b4ae0e81461eb2a3e272f95ab6721d50e35c32a9744/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f726f6d616e7a6970702f6c61726176656c2d71756575652d6d6f6e69746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/romanzipp/laravel-queue-monitor)[![GitHub Build Status](https://camo.githubusercontent.com/c380d4ff2b3a0ffe4460388b6577d244190f0a3b139a947d1c1b79cf924db81c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f726f6d616e7a6970702f4c61726176656c2d51756575652d4d6f6e69746f722f74657374732e796d6c3f6272616e63683d6d6173746572266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/romanzipp/Laravel-Queue-Monitor/actions)

This package offers monitoring like [Laravel Horizon](https://laravel.com/docs/horizon) for database queue.

Features
--------

[](#features)

- Monitor jobs like [Laravel Horizon](https://laravel.com/docs/horizon) for any queue
- Handle failing jobs with storing exception
- Monitor job progress
- Get an estimated time remaining for a job
- Store additional data for a job monitoring
- Retry jobs via the UI

Installation
------------

[](#installation)

```
composer require romanzipp/laravel-queue-monitor

```

There is an additional package [romanzipp/Laravel-Queue-Monitor-Nova](https://github.com/romanzipp/Laravel-Queue-Monitor-Nova) for **Laravel Nova** resources &amp; metrics.

### Upgrading

[](#upgrading)

✨ **See [Upgrade Guide](https://github.com/romanzipp/Laravel-Queue-Monitor/releases/tag/5.0.0) if you are updating to 5.0** ✨

- [Upgrading to 4.0 from 3.0](https://github.com/romanzipp/Laravel-Queue-Monitor/releases/tag/4.0.0)
- [Upgrading to 3.0 from 2.0](https://github.com/romanzipp/Laravel-Queue-Monitor/releases/tag/3.0.0)
- [Upgrading to 2.0 from 1.0](https://github.com/romanzipp/Laravel-Queue-Monitor/releases/tag/2.0.0)

Configuration
-------------

[](#configuration)

Copy configuration &amp; migration to your project:

```
php artisan vendor:publish --provider="romanzipp\QueueMonitor\Providers\QueueMonitorProvider" --tag=config --tag=migrations

```

Migrate the Queue Monitoring table. The table name can be configured in the config file or via the published migration.

```
php artisan migrate

```

Usage
-----

[](#usage)

To monitor a job, simply add the `romanzipp\QueueMonitor\Traits\IsMonitored` Trait.

```
use Illuminate\Bus\Queueable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use romanzipp\QueueMonitor\Traits\IsMonitored; // queueProgress(0);

        // Do something...

        $this->queueProgress(50);

        // Do something...

        $this->queueProgress(100);
    }
}
```

### Chunk progress

[](#chunk-progress)

A common scenario for a job is iterating through large collections.

This example job loops through a large amount of users and updates its progress value with each chunk iteration.

```
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Database\Eloquent\Collection;
use romanzipp\QueueMonitor\Traits\IsMonitored;

class ChunkJob implements ShouldQueue
{
    use IsMonitored;

    public function handle()
    {
        $usersCount = User::count();

        $perChunk = 50;

        User::query()
            ->chunk($perChunk, function (Collection $users) use ($perChunk, $usersCount) {

                $this->queueProgressChunk($usersCount‚ $perChunk);

                foreach ($users as $user) {
                    // ...
                }
            });
    }
}
```

### Progress cooldown

[](#progress-cooldown)

To avoid flooding the database with rapidly repeating update queries, you can set override the `progressCooldown` method and specify a length in seconds to wait before each progress update is written to the database. Notice that cooldown will always be ignore for the values 0, 25, 50, 75 and 100.

```
use Illuminate\Contracts\Queue\ShouldQueue;
use romanzipp\QueueMonitor\Traits\IsMonitored;

class LazyJob implements ShouldQueue
{
    use IsMonitored;

    public function progressCooldown(): int
    {
        return 10; // Wait 10 seconds between each progress update
    }
}
```

### Custom data

[](#custom-data)

This package also allows setting custom data in array syntax on the monitoring model.

```
use Illuminate\Contracts\Queue\ShouldQueue;
use romanzipp\QueueMonitor\Traits\IsMonitored;

class CustomDataJob implements ShouldQueue
{
    use IsMonitored;

    public function handle()
    {
        $this->queueData(['foo' => 'Bar']);

        // WARNING! This is overriding the monitoring data
        $this->queueData(['bar' => 'Foo']);

        // To preserve previous data and merge the given payload, set the $merge parameter true
        $this->queueData(['bar' => 'Foo'], true);
    }
}
```

In order to show custom data on UI you need to add this line under `config/queue-monitor.php`

```
'ui' => [
    ...

    'show_custom_data' => true,

    ...
]
```

### Initial data

[](#initial-data)

This package also allows setting initial data to set when the job is queued.

```
use Illuminate\Contracts\Queue\ShouldQueue;
use romanzipp\QueueMonitor\Traits\IsMonitored;

class InitialDataJob implements ShouldQueue
{
    use IsMonitored;

    public function __construct(private $channel)
    {
    }

    public function initialMonitorData()
    {
        return ['channel_id' => $this->channel];
    }
}
```

### Only keep failed jobs

[](#only-keep-failed-jobs)

You can override the `keepMonitorOnSuccess()` method to only store failed monitor entries of an executed job. This can be used if you only want to keep failed monitors for jobs that are frequently executed but worth to monitor. Alternatively you can use Laravel's built in `failed_jobs` table.

```
use Illuminate\Contracts\Queue\ShouldQueue;
use romanzipp\QueueMonitor\Traits\IsMonitored;

class FrequentSucceedingJob implements ShouldQueue
{
    use IsMonitored;

    public static function keepMonitorOnSuccess(): bool
    {
        return false;
    }
}
```

### Retrieve processed Jobs

[](#retrieve-processed-jobs)

```
use romanzipp\QueueMonitor\Models\Monitor;

$job = Monitor::query()->first();

// Check the current state of a job
$job->isFinished();
$job->hasFailed();
$job->hasSucceeded();

// Exact start & finish dates with milliseconds
$job->getStartedAtExact();
$job->getFinishedAtExact();

// If the job is still running, get the estimated seconds remaining
// Notice: This requires a progress to be set
$job->getRemainingSeconds();
$job->getRemainingInterval(); // Carbon\CarbonInterval

// Retrieve any data that has been set while execution
$job->getData();

// Get the base name of the executed job
$job->getBasename();
```

### Model Scopes

[](#model-scopes)

```
use romanzipp\QueueMonitor\Models\Monitor;

// Filter by Status
Monitor::failed();
Monitor::succeeded();

// Filter by Date
Monitor::lastHour();
Monitor::today();

// Chain Scopes
Monitor::today()->failed();
```

Tests
-----

[](#tests)

The easiest way to execute tests locally is via [**Lando**](https://lando.dev/). The [Lando config file](.lando.yml) automatically spins up app &amp; database containers.

```
lando start

lando phpunit-sqlite
lando phpunit-mysql
lando phpunit-postgres
```

Upgrading
---------

[](#upgrading-1)

- [**Upgrade from 2.0 to 3.0**](https://github.com/romanzipp/Laravel-Queue-Monitor/releases/tag/3.0.0)
- [Upgrade from 1.0 to 2.0](https://github.com/romanzipp/Laravel-Queue-Monitor/releases/tag/2.0.0)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

---

This package was inspired by gilbitron's [laravel-queue-monitor](https://github.com/gilbitron/laravel-queue-monitor) which is not maintained anymore.

[![Star History Chart](https://camo.githubusercontent.com/cf17d5746f97477c8e482d1ac84b699efcfd933937ac0c2efb68bb088ad74022/68747470733a2f2f6170692e737461722d686973746f72792e636f6d2f7376673f7265706f733d726f6d616e7a6970702f6c61726176656c2d71756575652d6d6f6e69746f7226747970653d44617465)](https://star-history.com/#romanzipp/laravel-queue-monitor&Date)

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance54

Moderate activity, may be stable

Popularity17

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 86.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~9 days

Recently: every ~1 days

Total

12

Last Release

316d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2e52eeaff6e3dfc82456a1615f69acf1b7a0212edc3833345d7f3bee9edef477?d=identicon)[edwardtich](/maintainers/edwardtich)

---

Top Contributors

[![romanzipp](https://avatars.githubusercontent.com/u/11266773?v=4)](https://github.com/romanzipp "romanzipp (352 commits)")[![edwardtich](https://avatars.githubusercontent.com/u/40536578?v=4)](https://github.com/edwardtich "edwardtich (14 commits)")[![AsemAlalami](https://avatars.githubusercontent.com/u/11025503?v=4)](https://github.com/AsemAlalami "AsemAlalami (5 commits)")[![robertogallea](https://avatars.githubusercontent.com/u/19411470?v=4)](https://github.com/robertogallea "robertogallea (4 commits)")[![davidhernandeze](https://avatars.githubusercontent.com/u/22482495?v=4)](https://github.com/davidhernandeze "davidhernandeze (4 commits)")[![NguyenUoc98](https://avatars.githubusercontent.com/u/43318488?v=4)](https://github.com/NguyenUoc98 "NguyenUoc98 (3 commits)")[![raavus-funkmaster](https://avatars.githubusercontent.com/u/42815989?v=4)](https://github.com/raavus-funkmaster "raavus-funkmaster (3 commits)")[![darron1217](https://avatars.githubusercontent.com/u/8064923?v=4)](https://github.com/darron1217 "darron1217 (3 commits)")[![laravel-shift](https://avatars.githubusercontent.com/u/15991828?v=4)](https://github.com/laravel-shift "laravel-shift (2 commits)")[![ordago](https://avatars.githubusercontent.com/u/6376814?v=4)](https://github.com/ordago "ordago (2 commits)")[![Tristan-MyAnaPro](https://avatars.githubusercontent.com/u/131149257?v=4)](https://github.com/Tristan-MyAnaPro "Tristan-MyAnaPro (2 commits)")[![sgtlambda](https://avatars.githubusercontent.com/u/5894809?v=4)](https://github.com/sgtlambda "sgtlambda (1 commits)")[![spekulatius](https://avatars.githubusercontent.com/u/8433587?v=4)](https://github.com/spekulatius "spekulatius (1 commits)")[![Magentron](https://avatars.githubusercontent.com/u/853900?v=4)](https://github.com/Magentron "Magentron (1 commits)")[![bluesheep100](https://avatars.githubusercontent.com/u/36697282?v=4)](https://github.com/bluesheep100 "bluesheep100 (1 commits)")[![davidfrigolet](https://avatars.githubusercontent.com/u/1573371?v=4)](https://github.com/davidfrigolet "davidfrigolet (1 commits)")[![eboye](https://avatars.githubusercontent.com/u/624357?v=4)](https://github.com/eboye "eboye (1 commits)")[![emildayan](https://avatars.githubusercontent.com/u/22715782?v=4)](https://github.com/emildayan "emildayan (1 commits)")[![huzaifaarain](https://avatars.githubusercontent.com/u/8613679?v=4)](https://github.com/huzaifaarain "huzaifaarain (1 commits)")[![jonnott](https://avatars.githubusercontent.com/u/472468?v=4)](https://github.com/jonnott "jonnott (1 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/edwardtich-laravel-queue-monitor/health.svg)

```
[![Health](https://phpackages.com/badges/edwardtich-laravel-queue-monitor/health.svg)](https://phpackages.com/packages/edwardtich-laravel-queue-monitor)
```

###  Alternatives

[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k12.1M99](/packages/laravel-pulse)[romanzipp/laravel-queue-monitor

Queue Monitoring for Laravel Database Job Queue

8271.6M1](/packages/romanzipp-laravel-queue-monitor)[imtigger/laravel-job-status

Laravel Job Status

5272.1M3](/packages/imtigger-laravel-job-status)[flarum/core

Delightfully simple forum software.

211.3M1.9k](/packages/flarum-core)[palpalani/laravel-sqs-queue-json-reader

Custom SQS queue reader for Laravel

26109.8k](/packages/palpalani-laravel-sqs-queue-json-reader)[alajusticia/laravel-logins

Session management in Laravel apps, user notifications on new access, support for multiple separate remember tokens, IP geolocation, User-Agent parser

2011.0k](/packages/alajusticia-laravel-logins)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
