Hivemq client unavailable

Hi Everyone,

There is one scenario for that I have been seeking for help to get better resolution/understand.

Scenario : Whenever client is communicating with broker and everything runs smoothing but in between whenever broker goes down and making up the broker then we have to restart the mqtt client other client unable to consume the message. Would like to know why it is happening ?

Thank you !!

Rahul

Hello @Rahul

Based on the scenario described it will depend on how your clients handle reconnections when the broker goes down. Some MQTT clients/libraries will detect unsuccessfully connections and try reconnecting after a defined number of attempts.

Kind regards,
Diego from HiveMQ Team

Hi @Diego,

Thanks for quick response and your time.

Could you help me with any example of reconnection which use the asp .net mqtt client library ??

Thanks
Rahul

Hi @Rahul

You’re welcome! I’m not very familiar with any MQTT Client ASP.NET library but please check the “Reconnecting” section of this GitHub repo.

                   finally
                   {
                       // Check the connection state every 5 seconds and perform a reconnect if required.
                       await Task.Delay(TimeSpan.FromSeconds(5));
                   }

Kind regards,
Diego from HiveMQ Team