[rabbitmq-discuss] Binding to multiple queues in a round-robin style using the PIKA library

Emile Joubert emile at rabbitmq.com
Fri Feb 3 12:10:34 GMT 2012

Hi Stephen,

On 02/02/12 16:36, Stephen Young wrote:
> I'm working on a system that receives a variety of different message
> types from different source queues, like the following:
> client binds to Q1, Q2, Q3
> server posts to Q2
> client reads request and updates database. If something goes awry, the
> client sends a basic_reject to requeue the request
> however, this seems to cause some problems in that the client will see
> a message in Q2, but need to have parsed a message in another queue
> first. However the clients seem to keep polling the same queue until
> success. Is there any better way to implement this system? Currently
> I'm defeating the deadlock by having enough clients + some dedicated
> clients on the bottleneck queues, but would prefer if each client
> could run autonomously and read from queues in a pattern / priority of
> some sort.

I'm reading your question as: How can I organise a workload with
multiple clients where some messages have dependencies on each other?

If possible publish all the information required to complete a task as a
single message.

Priorities can be emulated by using different queues, and consuming from
the queues designated as higher priority more often.

It's hard to give any further advice without more information about how
messages are intended to match up and how the parsing dependency works.
Perhaps you could offer more details.


More information about the rabbitmq-discuss mailing list