hivemq-mqtt-client
hivemq-mqtt-client copied to clipboard
Mqtt5UserProperty is empty when reconnected.
here is my code: `
Mqtt5Client client=Mqtt5Client.builder() .identifier("clientId") // use a unique identifier .serverHost("127.0.0.1") // use the HiveMQ broker .serverPort(1883) .automaticReconnectWithDefaultConfig() // the client automatically reconnects .build();
client.toBlocking().connectWith()
.cleanStart(false)
.willPublish(null)
.userProperties(Mqtt5UserProperties.of(Mqtt5UserProperty.of("k1","v1")))
.sessionExpiryInterval(TimeUnit.HOURS.toSeconds(1)) // buffer messages
.send();
`
the server can print Mqtt5UserProperty of k1 v1 well at the first time, but empty when reconnected.