PHP code example of messiaqin / qcloud-cmq

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

    

messiaqin / qcloud-cmq example snippets


return [
    'connections' => [
        'sync' => [
            'driver' => 'sync',
        ],
        'cmq' => [
            'driver' => 'cmq',
            'key' => env('CMQ_KEY', ''),
            'secret' => env('CMQ_SECRET', ''),
            'endpoint' => env('CMQ_PREFIX', 'https://cmq-gz.public.tencenttdmq.com'),
            'queue' => 'stocker',
            'fail_queue' => '',
            'policy' => 0,
            'max' => 1000,
        ],
    ]
];