[rabbitmq-discuss] smallest amount of work for a consumer

ppafford phillpafford at gmail.com
Tue May 14 17:10:31 BST 2013

This question is about Architecture / Design:

I have a consumer that needs to perform x numbers of tasks, when should I
think about breaking the consumer up into smaller task and/or adding the
smaller tasks into their own consumer?


Consumer FooBarShipping does

adds database entry for reporting
adds database entry for account
adds database entry for shipping
generates shipping invoice ( PDF or other formats if needed )
creates notification for shipping
creates notification for account
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

pdf ( documents )
But what is the smallest unit of work a consumer should do? Do I really need
a consumer to run a sql statement?

I watched

and to me the consumer looks to do basic tasks which kick off other basic


View this message in context: http://rabbitmq.1065348.n5.nabble.com/smallest-amount-of-work-for-a-consumer-tp26676.html
Sent from the RabbitMQ mailing list archive at Nabble.com.

More information about the rabbitmq-discuss mailing list