PHP code example of iqny / queue

1. Go to this page and download the library: Download iqny/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/ */

    

iqny / queue example snippets


第二步:php artisan vendor:publish --provider="Qihu\Queue\QueueQihuProvider"

php artisan queue:qihu start              启动

php artisan queue:qihu start --daemon=1   守护进程启动

php artisan queue:qihu stop               停止

php artisan queue:qihu restart            重启

for ($i = 0; $i < 10000; $i++) {
    $msg = [
        'message_order' => $i
    ];
    qihuPush('order', $msg);
    $msg = [
        'message_test' => $i
    ];
    qihuPush('test', $msg);
    $msg = [
        'message_log' => $i
    ];
    qihuPush('log',$msg);
}