fervo/FervoDeferredEventBundle — pull request #11 by Nyholm (2014-08-04 09:09:32+00:00)
Title: [WIP] Multiple queues

I want to implement the possibility to use multiple queues/backends. **This PR is not ready for merge.**

``` yml
tags:
- { name: fervo_deferred_event.listener, event: first, method: onFirst, backend: default }
- { name: fervo_deferred_event.listener, event: second, method: onSecond, backend: otherBackend }
```

I've made sure that you may configure the bundle for multiple backends. I followed the pattern from [SwiftMailerBundle](http://symfony.com/doc/current/reference/configuration/swiftmailer.html#using-multiple-mailers).

I got some problem I want some help solving.

### Service configuration
There is a lot of services depending on the backend configuration.
* `fervo_deferred_event.queue.sidekiq`
* `fervo_deferred_event.queue.amqp`
* `fervo_deferred_event.service.message_service`

Should we duplicate these for each backend? Like:
* `fervo_deferred_event.defaut.queue.sidekiq`
* `fervo_deferred_event.otherBackend.queue.amqp`
* etc

### The listener

Should we create a duplicate for `fervo_deferred_event.listener` for each backend as well?

### Same event different backends

How do we solve the problem when the same event should be deferred to multiple backends?
Look at [these lines](https://github.com/Nyholm/FervoDeferredEventBundle/compare/fervo:master...Nyholm:queue?expand=1#diff-1893a573aa8d434eb03a59b72141993aR47)

``` yml
tags:
- { name: fervo_deferred_event.listener, event: first, method: onFirst, backend: default }
...
tags:
- { name: fervo_deferred_event.listener, event: first, method: onFirst, backend: otherBackend }
```