PHPackages                             talvbansal/laravel-throttled-failed-jobs - 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. talvbansal/laravel-throttled-failed-jobs

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

talvbansal/laravel-throttled-failed-jobs
========================================

Get notified when a queued job fails but not too often

1.1.1(6y ago)1963MITPHPPHP &gt;=7.3CI failing

Since Nov 19Pushed 3y ago1 watchersCompare

[ Source](https://github.com/talvbansal/laravel-throttled-failed-jobs)[ Packagist](https://packagist.org/packages/talvbansal/laravel-throttled-failed-jobs)[ RSS](/packages/talvbansal-laravel-throttled-failed-jobs/feed)WikiDiscussions master Synced yesterday

READMEChangelog (3)Dependencies (5)Versions (6)Used By (0)

Throttled notifications for failed jobs within Laravel
======================================================

[](#throttled-notifications-for-failed-jobs-within-laravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/80520f385daf8894e819e7e01c64e3ab288f9968c3229f860f2a2ca32b9a269d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f74616c7662616e73616c2f6c61726176656c2d7468726f74746c65642d6661696c65642d6a6f62732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/talvbansal/laravel-throttled-failed-jobs)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/23e1d5e0bc0fd17b4180cba277f4cda23b8b297623e435da6028e85fbbd7b13b/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f74616c7662616e73616c2f6c61726176656c2d7468726f74746c65642d6661696c65642d6a6f62732f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/talvbansal/laravel-throttled-failed-jobs)[![StyleCI](https://camo.githubusercontent.com/91eb48d3a897d1050613ac71782d20a2d9608775b5f66ed050e16f549189305c/68747470733a2f2f7374796c6563692e696f2f7265706f732f3232323532323838322f736869656c64)](https://styleci.io/repos/222522882)[![SensioLabsInsight](https://camo.githubusercontent.com/7a395d7551140767a9f38f838e0e96b367bae56234402374185cd65ee8d795a1/68747470733a2f2f696d672e736869656c64732e696f2f73656e73696f6c6162732f692f3a73656e73696f5f6c6162735f69642e7376673f7374796c653d666c61742d737175617265)](https://insight.sensiolabs.com/projects/:sensio_labs_id)[![Quality Score](https://camo.githubusercontent.com/a56241ef10db6ff6bee45566f726ff3d6ce9451d644f4ceb68172c1c8d9bd1c9/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f74616c7662616e73616c2f6c61726176656c2d7468726f74746c65642d6661696c65642d6a6f62732e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/talvbansal/laravel-throttled-failed-jobs)[![Code Coverage](https://camo.githubusercontent.com/73c0a76f484e575b22d6a16c0df660dc622eef1b6812e5179e38cea9a53e0ee0/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f74616c7662616e73616c2f6c61726176656c2d7468726f74746c65642d6661696c65642d6a6f62732f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/talvbansal/laravel-throttled-failed-jobs/?branch=master)[![Total Downloads](https://camo.githubusercontent.com/fa7f24fcc7381abffd04f6631703eae225d81e447074abc517a6f5636d274c9f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f74616c7662616e73616c2f6c61726176656c2d7468726f74746c65642d6661696c65642d6a6f62732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/talvbansal/laravel-throttled-failed-jobs)

This package sends notifications if a queued job fails. However sometimes there are jobs that will trigger far too many notifications when failing and therefore throttling for those would be desirable. Out of the box it can send a notification via mail, Slack, and Microsoft Teams. It leverages Laravel's native notification system.

This package is heavily based on [Laravel failed job monitor](https://github.com/spatie/laravel-failed-job-monitor) by [Spatie](https://spatie.be/)

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

[](#installation)

You can install the package via composer:

```
composer require talvbansal/laravel-throttled-failed-jobs
```

The service provider will automatically be registered.

Next, you must publish the config file:

```
php artisan vendor:publish --provider="TalvBansal\ThrottledFailedJobMonitor\FailedThrottledJobsServiceProvider"
```

This is the contents of the default configuration file. Here you can specify the notifiable to which the notifications should be sent. The default notifiable will use the variables specified in this config file.

```
return [

    /*
     * The notification that will be sent when a job fails.
     */
    'notification' => \TalvBansal\ThrottledFailedJobMonitor\Notification::class,

    /*
     * The notifiable to which the notification will be sent. The default
     * notifiable will use the mail and slack configuration specified
     * in this config file.
     */
    'notifiable' => \TalvBansal\ThrottledFailedJobMonitor\Notifiable::class,

    /*
     * By default notifications are sent for all failures. You can pass a callable to filter
     * out certain notifications. The given callable will receive the notification. If the callable
     * return false, the notification will not be sent.
     */
    'notificationFilter' => null,

    /*
     * The channels to which the notification will be sent.
     */
    'channels' => ['mail', 'slack', 'msteams'],

    'mail' => [
        'to' => 'email@example.com',
    ],

    'slack' => [
        'webhook_url' => env('FAILED_JOB_SLACK_WEBHOOK_URL'),
    ],

    'ms-teams' => [
        'webhook_url' => env('MS_TEAMS_WEBHOOK_URL'),
    ],

    /*
     * The length of the throttle window in minutes. Eg: 10 would mean
     * only one notification of certain type would be actually sent
     * within a 10 minute window...
     */
    'throttle_decay' => 10,
];
```

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

[](#configuration)

### Customizing the notification

[](#customizing-the-notification)

The default notification class provided by this package has support for mail, Slack and [MS Teams](https://www.talvbansal.me/blog/send-notifications-to-ms-teams-with-laravel/).

If you want to customize the notification you can specify your own notification class in the config file.

```
// config/throttled-failed-jobs.php
return [
    ...
    'notification' => \App\Notifications\CustomNotificationForFailedJobMonitor::class,
    ...
```

### Customizing the notifiable

[](#customizing-the-notifiable)

The default notifiable class provided by this package use the `channels`, `mail` and `slack` keys from the `config` file to determine how notifications must be sent

If you want to customize the notifiable you can specify your own notifiable class in the config file.

```
// config/throttled-failed-jobs.php
return [
    'notifiable' => \App\CustomNotifiableForFailedJobMonitor::class,
    ...
```

### Customizing the throttle window

[](#customizing-the-throttle-window)

The default config sets a window of 10 minutes per notification type. You can easily change the length of that window so that you only receive 1 notification of a given type per x number of minutes in the config file.

```
// config/throttled-failed-jobs.php
return [
        'throttle_decay' => 10,
    ...
```

Usage
-----

[](#usage)

If you configured the package correctly, you're done. You'll receive a notification when a queued job fails.

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Testing
-------

[](#testing)

```
$ composer test
```

Security
--------

[](#security)

If you discover any security related issues, please email :author\_email instead of using the issue tracker.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Credits
-------

[](#credits)

- [Talv Bansal](https://github.com/talvbansal)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

Please see [this repo](https://github.com/laravel-notification-channels/channels) for instructions on how to submit a channel proposal.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~38 days

Total

4

Last Release

2252d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9c829c7a19b9512381047a8b028a97e8b1a8ed57423005a48d899ae138203ea1?d=identicon)[talvbansal](/maintainers/talvbansal)

---

Top Contributors

[![talvbansal](https://avatars.githubusercontent.com/u/7305131?v=4)](https://github.com/talvbansal "talvbansal (10 commits)")

---

Tags

hacktoberfestlaravelqueuejobmonitornotifythrottlefailed jobsthrottled

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/talvbansal-laravel-throttled-failed-jobs/health.svg)

```
[![Health](https://phpackages.com/badges/talvbansal-laravel-throttled-failed-jobs/health.svg)](https://phpackages.com/packages/talvbansal-laravel-throttled-failed-jobs)
```

###  Alternatives

[imtigger/laravel-job-status

Laravel Job Status

5272.1M3](/packages/imtigger-laravel-job-status)[croustibat/filament-jobs-monitor

Background Jobs monitoring like Horizon for all drivers for FilamentPHP

254255.2k6](/packages/croustibat-filament-jobs-monitor)[mpbarlow/laravel-queue-debouncer

A wrapper job for debouncing other queue jobs.

63714.4k1](/packages/mpbarlow-laravel-queue-debouncer)[pmatseykanets/artisan-beans

Easily manage your Beanstalkd job queues right from the Laravel artisan command

4482.1k](/packages/pmatseykanets-artisan-beans)[harris21/laravel-fuse

Circuit breaker for Laravel queue jobs. Protect your workers from cascading failures.

3786.5k](/packages/harris21-laravel-fuse)[maqe/laravel-sqs-fifo

Laravel package that enables support for SQS FIFO Queue

15137.2k](/packages/maqe-laravel-sqs-fifo)

PHPackages © 2026

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