[rabbitmq-discuss] smallest amount of work for a consumer
Michael Klishin
michael.s.klishin at gmail.com
Tue May 14 17:34:47 BST 2013
2013/5/14 ppafford <phillpafford at gmail.com>
> So my question is, when would I break out the bullet points into smaller
> consumers? The consumer as is runs fine but I feel it's getting too large
> and needs to be refactored into smaller, more manageable processes.
>
> Should each bullet point be it's own consumer? I can see breaking them up
> into three consumers
>
Do these steps have any interdependencies between them, e.g. C depends on A
being done?
How are your queues organized? Is there a single message that triggers all
these operations?
If these steps can be described as a single unit of work, you can use a
single consumer
with explicit acknowledgements and structure your code as a composed method
[1],
then acknowledge the message at the end.
If there are reasons to try to parallelize these steps, multiple queues and
consumers may help.
1. http://codebetter.com/jeremymiller/2006/12/03/composed-method-pattern/
--
MK
http://github.com/michaelklishin
http://twitter.com/michaelklishin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20130514/056fea32/attachment.htm>
More information about the rabbitmq-discuss
mailing list