How to tell if Celery is using librabbitmq?

2k Views Asked by At

According to Celery Documentation:

librabbitmq

If you’re using RabbitMQ (AMQP) as the broker then you can install the librabbitmq module to use an optimized client written in C:

$ pip install librabbitmq

The ‘amqp’ transport will automatically use the librabbitmq module if it’s installed, or you can also specify the transport you want directly by using the pyamqp:// or librabbitmq:// prefixes.

I installed librabbitmq and changed the BROKER_URL setting so that it starts with librabbitmq://.

How do I verify that Celery is now using librabbitmq (i.e., that I did everything correctly)?

1

There are 1 best solutions below

0
On
  1. Uninstall librabbitmq.
  2. Ensure that BROKER_URL starts with librabbitmq://.
  3. Try to do something with celery (e.g., python manage.py celery worker if using djcelery).
  4. The command will fail with ImportError: No module named librabbitmq.
  5. Reinstall librabbitmq.
  6. Repeat step 3.
  7. The command should now work without any problems.

It's not 100% conclusive, but does yield a reasonably good indication that celery is using librabbitmq.