How to handle blocked RabbitmMQ connections using Rebus

291 Views Asked by At

We are planning to use Rebus for all our RabbitMQ operations, but we have encountered a problem. When the RabbitMQ connection is blocked "_bus.Advanced.Routing.Send" method hangs indefinitely, causing our application to also hang.

I tried adding (a very ugly) hack to run the "_bus.Advanced.Routing.Send" operation in another thread and aborting the thread after a timeout, but it causes other problems (System.NotSupportedException: Pipelining of requests forbidden).

Is there a way to timeout operations on blocked connections (from high memory alarm)? Or at least detect blocked connections?

Thank you in advance.

0

There are 0 best solutions below