Closed ljwhx2002 closed 1 year ago
Hi @ljwhx2002 - to resend UserProperties you can do so through a DisconnectedListener:
.addDisconnectedListener(context ->
TypeSwitch.when(context.getReconnector())
.is(Mqtt5ClientReconnector.class, mqtt5ClientReconnector -> {
final var builder = mqtt5ClientReconnector.connectWith();
builder.userProperties(connectProperties);
builder.applyConnect();
}))
Let me know if this helps!
Hi @ljwhx2002 - since I haven't heard back I'll close out this issue. If the issue still exists, please let us know. We'd be happy to help out. Feel free to re-open or file another issue if that's the case.
here is my code:
the server can print Mqtt5UserProperty of k1 v1 well at the first time, but empty when reconnected.