Laravel Queue Debouncer package allows any queue job or chain in your Laravel application to be debounced, meaning that no matter how many times it’s dispatched within the specified timeout window, it will only run once. For example, imagine you dispatch a job to rebuild a cache every time a record is updated, but the job is resource intensive. Debouncing the job with a five-minute wait would ensure that the cache is only rebuilt once, five minutes after you finish making changes.

Debounced jobs can largely be treated like any other dispatched job.

Facade use App\Jobs\MyJob; use Mpbarlow\LaravelQueueDebouncer\Facade\Debouncer; Debouncer::debounce(new MyJob, 30); Helper function use App\Jobs\MyJob; debounce(new MyJob(), 30); When monitoring the queue, you will see an entry for the package’s internal dispatcher each time the debounced job is queued, but the job itself will only run once when the final wait time has expired.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners