Closed pravingaikwad07 closed 4 months ago
Hi @pravingaikwad07 - This looks to be an EMQ broker UI issue. The HiveMQ client will reconnect using the same credentials for the initial connection unless overridden via the Reconnector.
And to add to this position, we have many devices that reconnect to the HiveMQ broker and HiveMQ cloud that don't show this issue.
I'll close this issue as invalid but if you think I'm mistaken please let me know. I'd be happy to look closer if you could provide client code to reproduce with a test in HiveMQ broker. Unfortunately we can't debug the EMQ UI.
π Bug Report
Username is updated to "undefined"
π¬ How To Reproduce
Steps to reproduce the behaviour:
Code sample
// doing connection like this val ack = mqttClient!!.connectWith() .keepAlive(30) .cleanSession(false) .simpleAuth() .username("abcuser") .password("pwd123") .applySimpleAuth() .send()
// builder mqttClientBuilder = Mqtt3Client.builder() .automaticReconnect() .initialDelay(1, TimeUnit.SECONDS) .maxDelay(60, TimeUnit.SECONDS) .applyAutomaticReconnect() .serverHost(MQTTIPADDRESS) .identifier(clientIdentifier) .webSocketConfig(MqttWebSocketConfig.builder().serverPath(MQTT_SERVER_PATH).build()) .sslWithDefaultConfig() .addConnectedListener(mqttAddConnectionListener) .addDisconnectedListener(mqttDisconnectConnectionListener) .serverPort(MQTT_SERVER_PORT_NUMBER)
Environment
Android device
Hardware or Device? Android
Operating System? Server on Mac / app on Android
Which MQTT protocol version is being used? 3.1.1 mqtt
Which MQTT broker (name and version)? Hive MQTT
Screenshots
π Expected behavior
The client should auto reconnect with same username.
π Additional context
This happens when app is removed from the recent tasks or the app is in background for long duration.