PHP code example of ebeyrent / mopsy
1. Go to this page and download the library: Download ebeyrent/mopsy 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/ */
ebeyrent / mopsy example snippets
ucer = new \Mopsy\Producer(new Mopsy\Container(),
new Mopsy\Connection\Configuration());
$content = array(
'action' => 'foo',
'options' => array(
'bar' => 'baz',
'debug' => true,
),
);
$producer
->setExchangeOptions(Mopsy\Channel\Options::getInstance()
->setName('responsys-exchange')
->setType('direct'))
->publish(new Mopsy\Message($content));
define('AMQP_DEBUG', true);
... more code