PHP code example of yjtec / amqp_link

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

    

yjtec / amqp_link example snippets


composer isan vendor:publis --provider="Yjtec\AmqpLink\ProduceTopicServiceProvider"


 app('produce')->produceExchanges('key', 'content');

$callback = function ($msg) {
    echo $msg->body;
};

app('consume')->consumeQueueTopic($callback, 'key', 'queue_name');