eclipse-paho / paho.mqtt.java

Eclipse Paho Java MQTT client library. Paho is an Eclipse IoT project.
https://eclipse.org/paho
Other
2.14k stars 886 forks source link

java client always disconnect and reconnect #1001

Open mobaiLv opened 1 year ago

mobaiLv commented 1 year ago

Bug exists in MQTTv3 Client on Release Version 1.2.0 (Master Branch)

In what scenario will mqtt clients proactively disconnect themselves? My client frequently disconnects and reconnects

Adam-Grzenda commented 1 year ago

That could occur if your clients share the same client_id. In that case when those clients have auto-reconnect feature turned on, then they will disconnect each other on a reconnect attempt.

Obviously that behavior might depend on a MQTT broker you're using.