Paho Java Client disoconnects and reconnects constantly [message #1837723] |
Thu, 04 February 2021 18:30 |
Rehana Md Messages: 1 Registered: February 2021 |
Junior Member |
|
|
I am using Paho Java client library mqttV3 of version 1.2.5. ot connect to HiveMq
Here are the connection options I am using in my client code.
MqttConnectOptions conOpt = new MqttConnectOptions();
conOpt.setCleanSession(false);
conOpt.setKeepAliveInterval(2);
conOpt.setAutomaticReconnect(true);
conOpt.setUserName("somename");
conOpt.setPassword("somepassword");
So, The client started getting disconnected after an hour of its first connection and connecting back in sometime and this process is constantly repeating.
when I look at Hive logs the first disconnection happened because:
reason: Client was idle for too long
And then when it reconnected, it throws up another message on Hive logs which says
reason: Another client connected with the same client id.
After this there are constant disconnections as same client Id is being used to connect it back to back .
Wanted to know whether the autoreconnect after keep alive time elapse tried to make fresh connection with hive with same clientId.
Hoping to hear an answer to this as soon as possible.
Thanks&Regards,
Rehana
|
|
|
Powered by
FUDForum. Page generated in 0.03616 seconds