# Can one Worker pull tasks from multiple task queues?

**URL:** <https://community.temporal.io/t/can-one-worker-pull-tasks-from-multiple-task-queues/16640>\
**Category:** Community Support\
**Tags:** python-sdk\
**Created:** [March 2, 2025, 11:11pm UTC](https://community.temporal.io/t/can-one-worker-pull-tasks-from-multiple-task-queues/16640 "2025-03-02T23:11:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mathew](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/mathew/32/6922_2.png) [@mathew](https://community.temporal.io/u/mathew)\
**Post date:** [March 2, 2025, 11:11pm UTC](https://community.temporal.io/t/can-one-worker-pull-tasks-from-multiple-task-queues/16640/1 "2025-03-02T23:11:02Z")

</div>

I would like one `Worker` to pull from multiple task queues, while observing `max_concurrent_activities` across all queues. Is this possible using Temporal today (preferably using the Python SDK)?

The specific context behind the request is that I would like to implement some basic version of “fairness” using Temporal queues. Multiple groups (users / tenants) can generate tasks, and we would like for some users to be able “cut” a long line which was created by other users. The most basic way to achieve this is to use multiple queues, and allow only certain groups to utilize certain queues. I did see this [GitHub issue](https://github.com/temporalio/temporal/issues/1507) for priority queues, which would be great. But in the mean time I’m looking for a stop-gap solution.

One worker pulling from multiple queues in a round-robin (or even random) fashion would be sufficient to solve this problem for us for now. From the Python SDK `Worker` [code](https://github.com/temporalio/sdk-python/blob/main/temporalio/worker/_worker.py#L53), it looks like this is not possible, but I thought I would double check before creating a GitHub issue.

---

<div class="post-metadata">

**Author:** ![maxim](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/maxim/32/8_2.png) [@maxim](https://community.temporal.io/u/maxim)\
**Post date:** [March 3, 2025, 7:11am UTC](https://community.temporal.io/t/can-one-worker-pull-tasks-from-multiple-task-queues/16640/2 "2025-03-03T07:11:11Z")

</div>

It is not possible as Temporal uses long poll to deliver tasks. We are working on supporting fairnesss directly.

---

<div class="post-metadata">

**Author:** ![mathew](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/mathew/32/6922_2.png) [@mathew](https://community.temporal.io/u/mathew)\
**Post date:** [March 3, 2025, 4:48pm UTC](https://community.temporal.io/t/can-one-worker-pull-tasks-from-multiple-task-queues/16640/3 "2025-03-03T16:48:40Z")

</div>

Thanks for the confirmation @maxim.

Two follow-up questions, whenever you have the time:

- Do you have an ETA on the support for fairness, and a write-up of what the fairness feature will look like?
- Although it’s not implemented today, would it be doable to have the server reply to the long poll request with the events from more than 1 queue? That is, have the server implement round-robin queue polling in response to a multi-queue request from the `Worker` client? I ask because I would be happy to help contribute that feature, if that feature would be useful and you’d estimate the difficulty to not be too large.

---

<div class="post-metadata">

**Author:** ![maxim](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/maxim/32/8_2.png) [@maxim](https://community.temporal.io/u/maxim)\
**Post date:** [March 5, 2025, 2:56am UTC](https://community.temporal.io/t/can-one-worker-pull-tasks-from-multiple-task-queues/16640/4 "2025-03-05T02:56:14Z")

</div>

I believe it should happen this year, but no hard guarantee.

Ability to subscribe to multiple queues was discussed, but it is not trivial to implement and we decided to focus on the direct support for priorities and fairness in the matching engine. The round-robin polling will not work as each queue lives in its own partition, and a naive implementation will cause contact race conditions.
