PHP code example of biigle / laravel-round-robin-queue

1. Go to this page and download the library: Download biigle/laravel-round-robin-queue library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

biigle / laravel-round-robin-queue example snippets


// queue.connections
[
 'rr' => [
    'driver' => 'roundrobin',
    'queue' => 'default',
    'connections' => ['q1', 'q2'],
 ],
 'q1' => [/* ... */],
 'q2' => [/* ... */],
]

use Queue;

$queue = Queue::connection('rr');

$queue->push($job1); // Pushed to connection 'q1'.
$queue->push($job2); // Pushed to connection 'q2'.
$queue->push($job3); // Pushed to connection 'q1'.
$queue->push($job4); // Pushed to connection 'q2'.