title: Using MongoDB as message queue for Celery
body: <p>I'm trying to use MongoDB as the message queue for Celery (in a Django app). The current development version of Celery (2.2.0rc2) is supposed to let you do this, but I can't seem to get any workers to pick up tasks I'm creating.</p>
  
  <p>Versions:
  celery v2.2.0rc3<br>
  mongodb 1.6.5<br>
  pymongo 1.9<br>
  django-celery 2.2.0rc2</p>
  
  <p>In my settings, I have:  </p>
  
  <pre><code>CELERY_RESULT_BACKEND = "mongodb"
  CELERY_MONGODB_BACKEND_SETTINGS = {
      # Shouldn't need these - defaults are correct.
      "host": "localhost",
      "port": 27017,
      "database": "celery",
      "taskmeta_collection": "messages",
  }
  
  BROKER_BACKEND = 'mongodb'
  BROKER_HOST = "localhost"
  BROKER_PORT = 27017
  BROKER_USER = ""
  BROKER_PASSWORD = ""
  BROKER_VHOST = ""
  
  import djcelery
  djcelery.setup_loader()
  </code></pre>
  
  <p>I've created a test tasks.py file as follows:</p>
  
  <pre><code>from celery.decorators import task
  
  @task()
  def add(x, y):
      return x + y
  </code></pre>
  
  <p>If I fire up celeryd in the background, it appears to start normally. I then open a python shell and run the following:</p>
  
  <pre><code>&gt;&gt;&gt; from myapp.tasks import add
  &gt;&gt;&gt; result = add.delay(5,5)
  &gt;&gt;&gt; result
  &lt;AsyncResult: 7174368d-288b-4abe-a6d7-aeba987fa886&gt;
  &gt;&gt;&gt; result.ready()
  False
  </code></pre>
  
  <p>Problem is that no workers ever pick up the tasks. Am I missing a setting or something? How do I point celery to the message queue?</p>