2

I would like to setup multiple queues in celery. This is easy but I want the tasks in these queues to be picked up in a round robin fashion. Let me explain that with an example. Say there are 2 queues - Q1 and Q2. Say Q1 has tasks T1a, T1b, T1c and Q2 has tasks T2a, T2b, T2c. Say there are 10 celery workers - W1, W2,...W10. I would like to know the answers to two questions:

  1. In which order do these tasks get delivered to these 10 workers?
  2. Is there an option to make celery pick the tasks in round robin fashion among the queues? Say celery picks task T1a from Q1 and assigns it to worker W1. After this, I would like celery to pick task T2a from Q2 and assign to a worker. And then I would like T1b to be picked from Q1 and so on. Is this possible with celery? I plan to use redis as the broker and backend but I am open to other options to achieve the above.
Arjun
  • 385
  • 5
  • 17

0 Answers0