The RabbitMqBundle incorporates messaging in your application via RabbitMQ using the php-amqplib library.
The bundle implements several messaging patterns as seen on the Thumper library. Therefore publishing messages to RabbitMQ from a Symfony controller is as easy as:
$msg = array('user_id' => 1235, 'image_path' => '/path/to/new/pic.png');
$this->get('old_sound_rabbit_mq.upload_picture_producer')->publish(serialize($msg));
Later when you want to consume 50 messages out of the upload_pictures
queue, you just run on the CLI:
$ ./app/console rabbitmq:consumer -m 50 upload_picture
All the examples expect a running RabbitMQ server.
This bundle was presented at Symfony Live Paris 2011 conference. See the slides here.
To contribute just open a Pull Request with your new code taking into account that if you add new features or modify existing ones you have to document in this README what they do. If you break BC then you have to document it as well. Also you have to update the CHANGELOG. So:
- Document New Features.
- Update CHANGELOG.
- Document BC breaking changes.
The bundle structure and the documentation is partially based on the RedisBundle