I'm currently using Celery with Redis Cloud and it works fine. I want to move to Azure Service Bus, but i'm not finding any docs that describes how to do this. I've seen that celery will use Kombu instead native transport method like AMQP or Redis. Can someone please help me with that?
My main problem is: How to set CELERY_BROKER_URL and CELERY_RESULT_BACKEND considering that i have alredy a Azure Service Bus with a Topic, Subscription and a Queue?
azure-core==1.27.1
azure-servicebus==7.11.0
celery==5.2.7
django-celery-beat==2.5.0
kombu==5.2.4
To use Azure Service Bus as a broker and result for Celery in Django, you have to
Set the
CELERY_BROKER_URLandCELERY_RESULT_BACKENDenvironment variables.Set the
CELERY_BROKER_URLto the connection string of your Azure Service Bus queue or topic.Set the
CELERY_RESULT_BACKENDto the connection string of your Azure Service Bus queue or topic.For CosmosDB, use the
azure-cosmoslibrary. To set theCELERY_RESULT_BACKENDenvironment variable to use CosmosDB.Check Azure Service Bus client library for Python Code.
For MsSql, use the
pyodbclibrary. To set theCELERY_RESULT_BACKENDenvironment variable to use MsSql.For more information, refer to Azure Service Bus -Python and SO Link.