Skip to content

jonathan-sousa/silex-amqp-provider

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

silex-amqp-provider

Amqp service provider for the Silex framework.

This repository is strongly inspired by the work of Vitaliy Chesnokov on his Mongo Silex Provider.

Install via composer

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.

Usage

Service registration

$app->register(new AmqpServiceProvider, array(
    'amqp.connections' => array(
        'default' => array(
            'host' => 'localhost',
            'port' => 5672,
            'username' => 'guest',
            'password' => 'guest',
            'vhost'    => '/'
        )
    ),
));

Connections retrieving

$connections = $app['amqp'];
$defaultConnection = $connections['default']; 

Creating amqp connection via factory

$amqpFactory = $app['amqp.factory'];
$customConnection = $amqpFactory('localhost', 5672, 'guest', 'guest', '/');

About

Amqp service provider for the Silex framework.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages