paho.mqtt.java icon indicating copy to clipboard operation
paho.mqtt.java copied to clipboard

'setAutomaticReconnect' not reconnection, when broker is initially not available

Open hinterwaldlerFlo opened this issue 2 years ago • 1 comments

When using connOpts.setAutomaticReconnect(true) I was expecting, that the client also remains trying to connect to the broker, when the broker was not available on the first try. But for me the automatic reconnect just works, when the broker become unavailable during runtime.

Is that intended behavior?

Thanks

I am using: "org.eclipse.paho" % "org.eclipse.paho.client.mqttv3" % "1.2.5",

hinterwaldlerFlo avatar Apr 29 '22 09:04 hinterwaldlerFlo

Hello, I'm also facing the same issue. The "MqttAsyncClient.startReconnectCycle()" method should be called when first connection fails and automaticReconnect is set to true. Is there a way to handle this ?

Thanks

kroutal avatar Jun 07 '22 10:06 kroutal