5

I was looking at some tutorials for setting up Redis (message broker) + Celery for Django and I'm a little confused about how the queues work. The tutorial I followed was https://hackernoon.com/asynchronous-tasks-with-celery-redis-in-django-3e00d3735686

  1. Does redis have an inbuilt queue as the message broker? Or is the queue a part of celery?
  2. Which queue is the task pushed onto? The redis queue or the celery queue?

In this diagram it looks like redis and celery have their own queues

1 Answer 1

3

Celery does not have its own queue (at least not in that architecture). Redis will hold all the tasks in the queue, and then a celery worker node will consume the task from the Redis queue.

Sign up to request clarification or add additional context in comments.

3 Comments

The arch. from the tutorial or diagram?
Both. They both describe the same process. Celery is not supposed to be stateful, it just does something and then moves onto the next task.
Here's a minimum working example if it helps: github.com/stuart23/django-kubernetes-demo/tree/celery

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.