Closed ma7ammad closed 6 years ago
Hello, @ma7ammad - thanks for reaching out. I have a few follow up questions for you:
@pardahlman ,
I am looking for a way, to check at the startup of the app and during the the time that the app is running, to tell if RawRabbit stops (at any moment) so i can stop the app.
Hello again. Do you mean that the RabbitMQ broker is hosted in a docker container?
If you want to solve the problem of connect retry when the broker is down, then perhaps the Polly enricher might solve this issue, especially as it has support for declaring retry policies for the channel factory.
Hi, No it is not that. I am not looking to solve a connection problem but i am looking for a way to tell if there is a problem -regardless of the cause- which is bringing RawRabbit down. The app which is using RawRabbit should not work if RawRabbit is down; it should be stopped (Environment.Exit(1)).
I think what confuses me is what you mean with "RawRabbit" in this context:
The app which is using RawRabbit should not work if RawRabbit is down
Do you mean that the client application using RawRabbit should not work if the RabbitMQ broker is not responding? If that's the case, you could try to setup a subscription or publish a message and see if you get an exception.
Another option would be to replace the default IChannelPoolFactory
with the StaticChannelPool
and resolve the IChannelFactory
to create a few channels. This will definitely throw as soon as the IBusClient
is being resolved.
Yet another option, if you have activated the management plugin in RabbitMQ would be to use it's RESTful API (which only responds if the broker is reachable).
Hope this helps!
Hi,
I have searched the docs but could not find much. Is there anyway to check whether RawRabbit is connecting/running?
Thanks.