PHP code example of crutch / consumer-amqp
1. Go to this page and download the library: Download crutch/consumer-amqp 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/ */
crutch / consumer-amqp example snippets
/** @var Crutch\Consumer\ConsumerHandler $handler */
$consumer = new Crutch\AmqpConsumer\AmqpConsumer($serviceName, 'localhost', 5672, 'user', 'password');
$consumer->consume('topic', $handler);