title: How do I create celery queues on runtime so that tasks sent to that queue gets picked up by workers?
body: <p>I'm using django 1.4, celery 3.0, rabbitmq</p>
  
  <p>To describe the problem, I have many content networks in a system and I want a queue for processing tasks related to each of these network.</p>
  
  <p>However content is created on the fly when the system is live and therefore I need to create queues on the fly and have existing workers start picking up on them.</p>
  
  <p>I've tried scheduling tasks in the following way (where content is a django model instance):</p>
  
  <pre class="lang-py prettyprint-override"><code>queue_name = 'content.{}'.format(content.pk)
  # E.g. queue_name = content.0c3a92a4-3472-47b8-8258-2d6c8a71e3ba
  add_content.apply_async(args=[content], queue=queue_name)
  </code></pre>
  
  <p>This create a queue with name <code>content.0c3a92a4-3472-47b8-8258-2d6c8a71e3ba</code>, creates a new exchange with name <code>content.0c3a92a4-3472-47b8-8258-2d6c8a71e3ba</code> and routing key <code>content.0c3a92a4-3472-47b8-8258-2d6c8a71e3ba</code> and sends a task to that queue.</p>
  
  <p><strong>However I never see the workers picking up on these tasks.</strong> Workers that I have currently set up are not listening to any specific queues (not initialized with queue names) and pick up tasks sent to the default queue just fine. My Celery settings are:</p>
  
  <pre class="lang-py prettyprint-override"><code>BROKER_URL = "amqp://test:password@localhost:5672/vhost"
  CELERY_TIMEZONE = 'UTC'
  CELERY_ALWAYS_EAGER = False
  
  from kombu import Exchange, Queue
  
  CELERY_DEFAULT_QUEUE = 'default'
  CELERY_DEFAULT_EXCHANGE = 'default'
  CELERY_DEFAULT_EXCHANGE_TYPE = 'direct'
  CELERY_DEFAULT_ROUTING_KEY = 'default'
  
  CELERY_QUEUES = (
      Queue(CELERY_DEFAULT_QUEUE, Exchange(CELERY_DEFAULT_EXCHANGE),
          routing_key=CELERY_DEFAULT_ROUTING_KEY),
  )
  
  CELERY_CREATE_MISSING_QUEUES = True
  CELERYD_PREFETCH_MULTIPLIER = 1
  </code></pre>
  
  <p>Any idea how I can get the workers to pick up on tasks sent to this newly created queue?</p>