I have 3 queues q1, q2 and q3 and 3 consumers c1, c2 and c3.
q1 has high priority messages and q2 has the next priority.
c1 listens to only q1 and if c1 is taking time to finish the tasks, c2 should be able to take up some tasks from q1.
I have currently bound c2 to both q1 and q2 and used 'x-priority' to set up a higher priority for q1 and a lower priority for q2 using:
"channel.basic_consume( msg_consumer, queue="q1", arguments={'x-priority':10})"
"channel.basic_consume( msg_consumer, queue="q2", arguments={'x-priority':5})"
If I run c2 alone, it computes the tasks from q1 first and after all the tasks from q1 are completed, computes the tasks from q2, and works as expected.
But if I run both c1 and c2 in parallel, c2 just skips the taks from q1 and computes the tasks from q2, maybe because c1 is already listening to q1. This is not what I intend to do.
When both c1 and c2 are running in parallel, I would like both of them to compute tasks from q1 first.
Can anyone suggest me a way that I could parallelise this process?
Thanks