PHPackages                             mbm-rafal/laravel-single-dispatch - 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. mbm-rafal/laravel-single-dispatch

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

mbm-rafal/laravel-single-dispatch
=================================

Laravel Dispatcher extension for maintaining duplicate jobs

1.0.0(9y ago)46.4k2MITPHPPHP &gt;=5.5.9

Since May 28Pushed 9y ago1 watchersCompare

[ Source](https://github.com/mbm-rafal/laravel-single-dispatch)[ Packagist](https://packagist.org/packages/mbm-rafal/laravel-single-dispatch)[ RSS](/packages/mbm-rafal-laravel-single-dispatch/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (2)DependenciesVersions (3)Used By (0)

Single Dispatch
===============

[](#single-dispatch)

Extension for laravel dispatcher that do not allow to proceed same jobs on queues. Motivation for this feature is to not overuse resources while specific job is still waiting to be processed another one should not be queued.

Features
--------

[](#features)

- Allows to catch and ignore duplicated jobs

Requirements
------------

[](#requirements)

Installed

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

[](#installation)

Require the `mbm-rafal/laravel-single-dispatch` package in your composer.json and update your dependencies.

```
$ composer require mbm-rafal/laravel-single-dispatch
$ composer update

```

Publish migration files

```
$ php artisan vendor:publish --provider="MBM\Bus\BusServiceProvider" --force

```

Run migrations

```
$ php artisan migrate

```

Usage
-----

[](#usage)

To use this extension you have to update resource resolved by provided by `Dispatcher::class` to do so, simply switch `BusServiceProvider` in `app/config.php`

```
// Illuminate\Bus\BusServiceProvider::class,
\MBM\Bus\BusServiceProvider::class,
```

You have to apply code to Queue events in `AppServiceProvider`

```
# Manage processed jobs
Queue::after(function (JobProcessed $event) {
    app(\MBM\Bus\Dispatcher::class)->unregister($event->job);
});

Queue::failing(function (JobFailed $event) {
    app(\MBM\Bus\Dispatcher::class)->unregister($event->job);
});
```

If you want to allow job to be duplicated add interface to Job class definition

```
use Illuminate\Contracts\Queue\ShouldQueue;
use \MBM\Bus\AllowDuplicates

class CustomJob implements ShouldQueue, AllowDuplicates
{
    // Code
}
```

License
-------

[](#license)

Released under the MIT License, see LICENSE.

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

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

Unknown

Total

1

Last Release

3320d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1bd8b2a07a93f6ce6133d28add8f72115a20fd880102cb1b097afcc1bd71d3c0?d=identicon)[mbm-rafal](/maintainers/mbm-rafal)

---

Tags

dispatcherlaravelmiddlewaremiddlewarelaraveldispatched

### Embed Badge

![Health badge](/badges/mbm-rafal-laravel-single-dispatch/health.svg)

```
[![Health](https://phpackages.com/badges/mbm-rafal-laravel-single-dispatch/health.svg)](https://phpackages.com/packages/mbm-rafal-laravel-single-dispatch)
```

###  Alternatives

[kunalvarma05/laravel-rabbitmq

Work with RabbitMQ in Laravel.

1855.7k](/packages/kunalvarma05-laravel-rabbitmq)

PHPackages © 2026

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