https://github.com/contamobi/cmobirabbitmqbundle
Bundle to manager RabbitMQ message broker using phpamqplib
https://github.com/contamobi/cmobirabbitmqbundle
Last synced: 3 months ago
JSON representation
Bundle to manager RabbitMQ message broker using phpamqplib
- Host: GitHub
- URL: https://github.com/contamobi/cmobirabbitmqbundle
- Owner: contamobi
- License: mit
- Created: 2016-02-26T13:16:24.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-05-29T23:59:22.000Z (about 8 years ago)
- Last Synced: 2025-03-24T10:38:54.957Z (4 months ago)
- Language: PHP
- Size: 188 KB
- Stars: 1
- Watchers: 1
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## CmobiRabbitmqBundle ##
[](http://travis-ci.org/contamobi/CmobiRabbitmqBundle)
[](https://coveralls.io/github/contamobi/CmobiRabbitmqBundle?branch=master)
[](https://scrutinizer-ci.com/g/contamobi/CmobiRabbitmqBundle/?branch=master)
[](https://www.versioneye.com/user/projects/56d0b268157a690037bbb6e8)[](https://packagist.org/packages/cmobi/rabbitmq-bundle)
[](https://packagist.org/packages/cmobi/rabbitmq-bundle)
[](https://packagist.org/packages/cmobi/rabbitmq-bundle)
[](https://packagist.org/packages/cmobi/rabbitmq-bundle)The bundle provides a [RabbitMq](http://rabbitmq.com/) integration for your [Symfony2](http://symfony.com/) Project. Based on [php-amqplib](https://github.com/php-amqplib/php-amqplib).
## Installation ##
```
$ composer require cmobi/rabbitmq-bundle --no-update
```Register the bundle:
``` php
// app/AppKernel.phppublic function registerBundles()
{
return array(
new \Cmobi\RabbitmqBundle\CmobiRabbitmqBundle(),
// ...
);
}
```Install the bundle:
```
$ composer update cmobi/rabbitmq-bundle
```## Usage: ##
Add `cmobi_rabbitmq` section in your configuration file:
```yaml
cmobi_rabbitmq:
connections:
default:
host: 172.17.0.1
port: 5672
user: 'guest'
password: 'guest'
vhost: '/'
lazy: false
connection_timeout: 3
read_write_timeout: 3
# requires php-amqplib v2.4.1+ and PHP5.4+
keepalive: false
# requires php-amqplib v2.4.1+
heartbeat: 0
```Register rpc servers:
```yaml
cmobi_rabbitmq:
//...
rpc_servers:
primary_server:
queue: { name: 'primary_queue' }
second_server:
queue: { name: 'second_queue' }
```