Question: Here's my scenario:

When a user logs in to my website, I queue up a bunch of tasks for the given user (typically each task takes 100s of msecs and there are 100s of tasks per user). These tasks are queued to the default Celery Queue and I have 100s of workers running. I use websockets to show the user real-time progress as the tasks complete on the backend. Life is good if I have just 1 or 2 users active.

Now if I a few concurrent users log-in to my site, the latter users are queued behind the initial users and their tasks starve (since all the tasks go to the same queue). My thoughts are to create a dynamic queue per user to ensure fairness. However as per Celery documentation (<http://docs.celeryproject.org/en/latest/userguide/routing.html#defining-queues>), seems I need to be define the queues statically.

Any suggestions on best practices for using celery for my scenario?

Answer: 
<http://docs.celeryproject.org/en/latest/userguide/workers.html#queues>

```
celery -A proj control add_consumer foo -d worker1.local

```

The same can be accomplished dynamically using the app.control.add\_consumer() method:

```
app.control.add_consumer('foo', reply=True)
[{u'worker1.local': {u'ok': u"already consuming from u'foo'"}}]

app.control.add_consumer('foo', reply=True,
destination=['worker1@example.com'])

```
You can dynamically assign a task to a Queue at runtime when invoking it refer [calling.html#routing-options](http://docs.celeryproject.org/en/latest/userguide/calling.html#routing-options). 
This would work if you have [`CELERY_CREATE_MISSING_QUEUES`](http://docs.celeryproject.org/en/latest/userguide/configuration.html#std:setting-task_create_missing_queues) enabled.