我在 RabbitMQ 上有一个问题,每当我删除一个队列时,CPU 就会上升。我删除兔子队列的次数越多,CPU 就会逐渐增加。在我看来,在某些时候有一些对象没有结束。顺便说一句,我的代码没有循环,只是普通的 QueueDelete。我正在使用 RabbitMQ .net 库。
请让我知道您是否遇到过此类问题以及您是如何解决的。或者任何建议都可以。
此致,
I fixed this issue by checking channels and consumers if they are still running.
So on my consume method, before I get the message, I am checking if the channel is still open and or the consumer tag is still running. This way I know what to do if this returns true. What happened on my previous code was I don't have checking and exceptions was not handled. So every time I delete a channel it is throwing an exception on consume.
Thanks