Amqp service provider for the Silex framework.
This repository is strongly inspired by the work of Vitaliy Chesnokov on his Mongo Silex Provider.
Add in your composer.json
the require entry for this library.
{
"require": {
"ebichan/silex-amqp-provider": "dev-master"
}
}
and run composer install
(or update
) to download all files.
$app->register(new AmqpServiceProvider, array(
'amqp.connections' => array(
'default' => array(
'host' => 'localhost',
'port' => 5672,
'username' => 'guest',
'password' => 'guest',
'vhost' => '/'
)
),
));
$connections = $app['amqp'];
$defaultConnection = $connections['default'];
$amqpFactory = $app['amqp.factory'];
$customConnection = $amqpFactory('localhost', 5672, 'guest', 'guest', '/');