简体   繁体   English

RabbitMq队列填满

[英]RabbitMq queue filling up

We have a rabbitmq queue with multiple java programs on different linux servers consuming from that queue. 我们有一个Rabbitmq队列,在不同的Linux服务器上有多个Java程序从该队列中消费。 Sometimes the queue fills up such that we need to purge the queue and loose messages. 有时,队列已满,因此我们需要清除队列并释放消息。

Looking at the CPU usage on the client machines, the clients do not seem to be the bootleneck. 从客户端计算机上的CPU使用情况来看,客户端似乎不是问题的根源。 Their usage is at about 25% on a multicore box. 在多核设备上,它们的使用率约为25%。 Hence I guess the network might be the bottleneck. 因此,我认为网络可能是瓶颈。 Is there anyway I can see this from the management interface of rabbitmq? 无论如何,我可以从rabbitmq的管理界面中看到这一点吗?

Thanks 谢谢

Your clients may actually be losing connection to RabbitMQ. 您的客户实际上可能会失去与RabbitMQ的连接。 I have run into similar problems when after some prolonged period of clients being inactive - for example when the producers don't fill the queue for a long time, the clients have nothing to consume - the TCP connection between clients and RabbitMQ can get interrupted, usually by a load balancer but the client never finds out that the connection was dropped. 当客户端长时间不活动后,例如,当生产者很长一段时间没有排队时,客户端什么也没消耗的时候,我遇到了类似的问题-客户端和RabbitMQ之间的TCP连接可能会中断,通常由负载平衡器执行,但客户端永远不会发现连接已断开。 Here is how to test for it: when you find your clients are no longer consuming from the queue, kill the clients and restart them and see if the queue starts to reduce the message backlog. 这是测试方法:当您发现客户端不再使用队列时,请杀死客户端并重新启动客户端,然后查看队列是否开始减少消息积压。 If yes, that is exactly your problem. 如果是,那正是您的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM