PHP code example of douyu / beanstalk

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

    

douyu / beanstalk example snippets


php bin/hyperf.php vendor:publish douyu/beanstalk

'beanstalk'  => [
    'driver'    => \Douyu\Beanstalk\BeanstalkDriver::class,
    'beanstalk' => [
        'pool' => 'default'
    ],
    'channel' => 'btqueue',
    'tube'    => 'default',
    'timeout' => 2,
    'retry_seconds' => [1, 5, 10],
    'handle_timeout' => 10,
    'processes' => 1,
    'concurrent' => [
        'limit' => 5,
    ],
]