Closed sagikazarmark closed 9 years ago
Hmm... could work.
If the main script wanted to loop over different queues by name though, it could just as easily grab 'em from the QueueFactory and pass them in as they are now, which gives us a tighter, cleaner API. We could always create a helper class for that in the future anyways. I feel like there'd be some extra behavior folks might want to add there anyways, such as priority or routing etc, which we could allow by replacing that helper class rather than the core consumer.
I think priority should rather be a concern of the backend. Most of them support it.
Actually I am thinking about closing this for a while as the original idea was that by creating a queue object we have to create a factory first, so skipping this step could be a simplification. But I realised that creating a queue object is as easy as a factory.
Also, if we are going to use the "native" consumer then this becomes invalid.
See #9
Became invalid
Currently a specific queue object is required in the consumer. Thinking about passing a queue factory in the ctor, and accepting a string queue name in the
consume
method.