0

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.

TheBlaze
  • 1
  • 2
  • Does it hang indefinitely? Isn't it just blocked until the broker is able to accept the message? – mookid8000 Sep 22 '21 at 19:56
  • Hi, yes it is blocked until the broker is able to accept messages again, but this could be a very long time. We have to respond in milliseconds, seconds at worst. High disk or memory alert would last minutes or possibly hours. That is why we would like to have ability to return faster (with an error). – TheBlaze Sep 23 '21 at 08:26

0 Answers0