0

我在 RabbitMQ 上有一个问题,每当我删除一个队列时,CPU 就会上升。我删除兔子队列的次数越多,CPU 就会逐渐增加。在我看来,在某些时候有一些对象没有结束。顺便说一句,我的代码没有循环,只是普通的 QueueDelete。我正在使用 RabbitMQ .net 库。

请让我知道您是否遇到过此类问题以及您是如何解决的。或者任何建议都可以。

此致,

4

1 回答 1

0

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

于 2012-07-21T07:03:46.360 回答