开发者

How to make RabbitMQ gracefully recover from dropped connections

开发者 https://www.devze.com 2023-03-30 00:01 出处:网络
I am coming from the MSMQ world so forgive me if I am missing something obvious. Is there a way to make RabbitMQ gracefully attempt to reconnect to a connection that has been dropped (for example bec

I am coming from the MSMQ world so forgive me if I am missing something obvious.

Is there a way to make RabbitMQ gracefully attempt to reconnect to a connection that has been dropped (for example because of poor network connectivity) in the background, so that attempts t开发者_运维百科o publish to it / receive from it will not throw exceptions?


I don't know if the RabbitMQ .NET libraries are any different, but with the Java libraries (v2.3.1) I had to catch the exception which was thrown when my broker went down and attempt to reconnect manually, using my own retry logic and back-off heuristics.

0

精彩评论

暂无评论...
验证码 换一张
取 消