PHP code example of peachpear / pear-consumer

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

    

peachpear / pear-consumer example snippets


cd /path/yourProjectName/public

// log队列消费者开始运行
php yii consumer/start log

// mail队列消费者开始运行
php yii consumer/start mail

// ticket队列消费者开始运行
php yii consumer/start ticket

// ticket队列消费者停止运行
php yii consumer/stop ticket

// ticket队列消费者重启运行
php yii consumer/restart ticket

// ticket延迟队列消费者开始运行
php yii delay/start ticket

// push_socket队列消费者开始运行
php yii consumer/start pushSocket