Looking at https://docs.celeryq.dev/en/v5.2.7/getting-started/backends-and-brokers/index.html it sounds pretty much as if it's not possible / desirable. There is a section about SQLAlchemy, but Django does not use SQLAlchemy.
In way older docs, there is https://docs.celeryq.dev/en/3.1/getting-started/brokers/django.html .
Is it possible with recent Celery / Django versions to use Celery with just the database for storing messages / results?
Yes you can totally do this, even if it's not the most performant/recommended way to do. I use it for simple projects in which I don't want to add Redis.
To do so, first, add SQLAlchemy v1 as a dependency in your project: SQLAlchemy = "1.*"
Then in your settings.py:
CELERY_BROKER_URL = sqla+postgresql://user:[email protected]:5432/dbnameCELERY_BROKER_URL = "sqla+sqlite:///" + os.path.join(BASE_DIR, 'your_database.db') . Note that the folder holding the database must be writable. For example if your database is located in project/dbfolder/database.db, chmod 777 project/dbfolder will do the trick.As a sidenote, I'm using django-celery-results to store results of my tasks. This way, I have a fully featured Celery without using other tech tool (like rabbitMQ or Redis) in my stack.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With