PHP code example of ddjkazuma / rabbitqueue

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

    

ddjkazuma / rabbitqueue example snippets


    //specify your connection name here
    'rabbit_demo'=>[
            'driver'=>'rabbit',//driver must by rabbit
            'connection'=>'default',
            'host'=>'localhost',
            'port'=>5672,
            'username'=>'guest',
            'password'=>'guest',
            'queue'=>'privilege_demo',//specify your queue name here 
            'exchange'=>'basic_exchange',
            'routing_key'=>'privilege_demo',
        ]

    dispatch(new DemoJob())->onConnection('rabbit_demo')->onQueue('privilege_demo');