How Celery and Broker communicate?

Viewed 91

Many posts explain that message broker assigns task as worker.

But it seems to me that the broker stays still and takes the task through the pop command from Celery. (at least, when I use redis as a broker)

Even if I check tcpdump, it seems like the Celery server is requesting BRPOP to redis.

07:23:52.609733 IP worker1.toy_project_default.50814 > 02f82bfb5af2.6379: Flags [P.], seq 3235:3314, ack 1075, win 501, options [nop,nop,TS val 928306453 ecr 97752668], length 79: RESP "BRPOP" "celery" "celery^F^V3" "celery^F^V6" "celery^F^V9" "1"

And it's synchronizing using Mingle and Gossip.

I wonder if the start of task message transmission starts with Celery's request or from the broker's transmission.

Is it different when I use RabbitMQ and redis? (.... or mongoDB)

It doesn't look like a polling...(and pub/sub)

Please let me know how the message is sent from the broker to the worker.

I know that when a task is saved in a broker, it is saved using kombu.

0 Answers
Related