PHPackages                             braincrafted/mq-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Queues &amp; Workers](/categories/queues)
4. /
5. braincrafted/mq-bundle

ActiveLibrary[Queues &amp; Workers](/categories/queues)

braincrafted/mq-bundle
======================

v0.4(12y ago)932PHP

Since May 29Pushed 11y ago1 watchersCompare

[ Source](https://github.com/braincrafted/mq-bundle)[ Packagist](https://packagist.org/packages/braincrafted/mq-bundle)[ RSS](/packages/braincrafted-mq-bundle/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (2)Dependencies (3)Versions (9)Used By (0)

BraincraftedMqBundle
====================

[](#braincraftedmqbundle)

BraincraftedMqBundle wraps [BcMq](https://github.com/braincrafted/mq) into a nice bundle for Symfony2 to provide you with a PHP implementation of a Message Queue Sever.

By [Florian Eckerstorfer](http://florianeckerstorfer.com).

Installation
------------

[](#installation)

The recommended way of installing BraincraftedMqBundle is through Composer.

```
#composer.json
{
    "require": {
        "braincrafted/mq-bundle": "dev-master"
    }
}
```

You also need to add it to your `AppKernel.php`.

```
// app/AppKernel.php
public function registerBundles()
{
    $bundles = array(
        // ...
        new Braincrafted\Bundle\MqBundle\BraincraftedMqBundle()
    );

    // ...

    return $bundles;
}
```

Usage
-----

[](#usage)

BraincraftedMqBundle uses services (instead of callbacks) to consume messages. You can configure those consumers in your `config.yml`.

app/config/config.yml
=====================

[](#appconfigconfigyml)

```
braincrafted_mq:
    consumers:
        write_file: acme_demo.consumer.write_file
```

Now you need to define the service `acme_demo.consumer.write_file` in your bundles service configuration. You have to write those consumers by yourself. An example is given below.

```
