'Celery Upgrade - Workers not working with RabbitMQ

Problem description

  • I have a working django application using Celery along with Mongo and RMQ (3.7.17-management-alpine)
  • The application runs on kubernetes cluster The application works fine in general
  • But when I upgrade Celery (3.1.25) and Kombu (3.0.37) to Celery (4.1.0) and Kombu (4.1.0), I face following issue:
  1. Celery worker pods come up but do not receive the tasks
  2. I have verified that RMQ receives the messages needed to run tasks in celery workers
  3. There is no error in RMQ or celery worker pod
  4. In fact, celery pod mentions that it is connected to RMQ
  5. Strangely, when I restart the RMQ pod after Celery worker pod comes up things become fine
  6. I am able to run the new tasks in celery workers after I restart RMQ pod

So I guess something happened wrt Celery/Kombu/RMQ after upgrade to 4.1.0 The code works fine with older version of Celery and Kombu.

Can someone please help me wrt this?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source