PHP code example of dmftaras / amqp-queue

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

    

dmftaras / amqp-queue example snippets


    'components' => [
        'master_queue' => [
            'class' => \dmftaras\amqp_queue\Queue::class,
            'exchange_name' => 'master.tasks',
            'queue_name' => 'master.tasks',
            'routing_key' => 'master.tasks'
        ],
    ],

    'bootstrap' => [
        'master_queue'
    ],

\Yii::$app->test_queue->push(new TestJob([
    'property' => 'value'
]));

php composer.phar 

php yii test-queue/listen