The WowoQueueBundle provides unified method for use queue systems, like Beanstalkd, RabbitMQ, flat files, database driven queues, etc. For now it only supports Beanstalkd, but you can add your own implementation on your own and send pull request.
Add following lines to your deps
file:
[WowoQueueBundle]
git=git://github.com/wowo/WowoQueueBundle.git
target=bundles/Wowo/Bundle/QueueBundle
[pheanstalk]
git=https://github.com/pda/pheanstalk
target=/pheanstalk
version=v1.1.0
Now, run the vendors script to download the bundle:
$ php bin/vendors install
Add the Wowo
namespace to your autoloader:
<?php
// app/autoload.php
$loader->registerNamespaces(array(
// ...
'Wowo' => __DIR__.'/../vendor/bundles',
));
Also add Pheanstalk init on the bottom of autoload:
// ...
require_once __DIR__.'/../vendor/pheanstalk/pheanstalk_init.php';
Finally, enable the bundle in the kernel:
<?php
// app/AppKernel.php
public function registerBundles()
{
$bundles = array(
// ...
new Wowo\QueueBundle\WowoQueueBundle(),
);
}
On Debian linux systems (including Ubuntu) you can run:
$ sudo apt-get install beanstalkd
Then run it as a daemon:
$ beanstalkd -d -l 127.0.0.1 -p 11300