python – How to stop celery from pushing into an full rabbitmq queue

I have a queue defined with Kombu as follows

from kombu import Queue

Queue("myname", "exchange", max_length=10,  queue_arguments={"x-overflow": "reject-publish"},)

My expectation is to reject all incoming messages and that the publishing count in rabbitmq management ist still 0, however what i discovered is, that the number isn’t 0, but rather the rate at which i set celery beat to publish. Why is that so?

How would i tell celery beat, to not create a task, if the queue is full?

Read more here: Source link