Looking to hire Laravel developers? Try LaraJobs

laravel-multi-queue maintained by anthonyedmonds

Description
Have a Laravel job worker listen to multiple queues instead of just one!
Last update
2026/04/09 10:39 (dev-main)
License
Links
Downloads
111

Comments
comments powered by Disqus

laravel-multi-queue

Have a Laravel job worker listen to multiple queues instead of just one!

About

By default Laravel Queue Workers can only monitor one queue at a time.

This library provides a Connector and a Queue driver to handle multiple queues with the same worker.

The only driver currently supported is Laravel's database driver.

Usage

  1. Install the library using Composer:
    composer require anthonyedmonds/laravel-multi-queue
    
  2. Adjust your queue configuration file:
    • Set the driver of your database queue to multi-queue
    • Add the queues key with a list of queues for the connection to monitor:
    // Provide a static list...
    'queues' => ['default', 'mail', 'other'],
    
    // Or add them from the environment...
    'queues' => explode(
        ',',
        env(
            'DB_QUEUE_MULTI',
            env('DB_QUEUE', 'default'),
        ),
    ),