简体   繁体   English

RMQ 服务器在应用程序运行时关闭

[英]RMQ server shut down while the application is running

I have an application that uses RabbitMQ.我有一个使用 RabbitMQ 的应用程序。 Now, I have a requirement to close the application in case the RMQ server is shut down while the application is running.现在,我需要关闭应用程序,以防在应用程序运行时 RMQ 服务器关闭。 Currently, RabbitMq.Client does not send any message/notification whenever the status of the server changes.目前,RabbitMq.Client 不会在服务器状态发生变化时发送任何消息/通知。

Is there any way to achieve this?有没有办法实现这一目标? Any help would be highly appreciated.任何帮助将不胜感激。

Thanks in advance.提前致谢。

Your application should continuously monitor RabbitMQ server and when ever it finds the RabbitMQ server is down the monitoring service should shut down your application.您的应用程序应该持续监控 RabbitMQ 服务器,并且当它发现 RabbitMQ 服务器关闭时,监控服务应该关闭您的应用程序。

It can't be achieved from RabbitMQ end as if RabbitMQ server is itself down which will happen abruptly then how can it send a notification to application to stop.它无法从 RabbitMQ 端实现,就好像 RabbitMQ 服务器本身关闭一样,这会突然发生,那么它如何向应用程序发送通知以停止。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM