RabbitMQ中的celeryev队列变得非常大 [英] celeryev Queue in RabbitMQ Becomes Very Large

查看:121
本文介绍了RabbitMQ中的celeryev队列变得非常大的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Rabbitmq上使用芹菜。我已经将数千条消息发送到队列,并且它们正在成功处理,并且一切正常。但是,几个rabbitmq队列中的消息数量正在增长(队列中成千上万的项目)。队列被命名为 celeryev。[...] (请参见下面的屏幕截图)。这是适当的行为吗?这些队列的目的是什么,不应该定期清除它们吗?有没有一种方法可以更定期地清除它们,我认为它们占用了大量磁盘空间。

I am using celery on rabbitmq. I have been sending thousands of messages to the queue and they are being processed successfully and everything is working just fine. However, the number of messages in several rabbitmq queues are growing quite large (hundreds of thousands of items in the queue). The queues are named celeryev.[...] (see screenshot below). Is this appropriate behavior? What is the purpose of these queues and shouldn't they be regularly purged? Is there a way to purge them more regularly, I think they are taking up quite a bit of disk space.

推荐答案

您可以使用 CELERY_EVENT_QUEUE_TTL celery选项(仅与amqp配合使用),将设置消息的过期时间,此后将其从队列中删除。

You can use the CELERY_EVENT_QUEUE_TTL celery option (only working with amqp), that will set the message expiry time, after which it will be deleted from the queue.

这篇关于RabbitMQ中的celeryev队列变得非常大的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆