-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MQTT broker connection status #176
Comments
I'm not sure I understand exactly all points. Can you maybe share the whole code to reproduce the issue? In which case do you get the output from point 2? After calling The
|
Firstly, thanks for your quick response :) 1: When the ActiveMQ is unavailable, I receive the log mentioned in "2". Also, in this situation, the "publisher.PublishAsync" method does not drop in the catch block. 2: The Generally speaking, I want to handle situations where ActiveMQ is not available. For example: try five times to connect and then kill the process or send a notification to the admin |
Which QoS level are you setting for the produced messages? You should definitely get an exception when producing with QoS >= 1. For monitoring and alarming purpose you could try to rely on logs and health checks. By the way, Silverback autonomously retries and reconnects, you don't have to take care of this aspect. |
ProducerBackgroundService
andprotected override async Task ExecuteAsync(CancellationToken stoppingToken)
While:
.AddSilverback().AddSingletonBrokerCallbackHandler<IMqttClientConnectedCallback>
Not working properly, after couple of messages identifying the new status.
.AddSilverback().AddSingletonBrokerCallbackHandler<IMqttClientDisconnectingCallback>
Not working and in case of broker is not available not firing
The text was updated successfully, but these errors were encountered: