PHP code example of evaneos / hector-bundle

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

    

evaneos / hector-bundle example snippets


    public function registerBundles()
    {
        $bundles = array(
			...
            new Evaneos\HectorBundle\HectorBundle()
        );
    }

$publisher = $container->get('evaneos.bill.publisher');
$publisher->publish(json_encode(['bill']), 'process');

$consumer = $container->get('evaneos.bill.consumer');
$consumer->initialize();

/* @var AMQPQueue $queue */
$queue = $this->consumer->getQueue()->getWrappedQueue();

//$queue->get();
//$queue->consume(function(AMQPEnveloppe $message){});
// $this->reactConsumer = new Consumer($queue, $this->loop, 0.1, 10);