-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Topic unpopulated once client reconnects #1213
Comments
I'm experiencing the same issue with I'm guessing this has something to do with the MQTTv5 implementation? =============================================== EDIT: |
Okay I've finally got to the bottom of this, it seems to be a MQTT.js bug in the reconnect logic. Some context: MQTTv5 supports a feature called Topic Aliasing where topics can be replaced by a short numeric ID after being sent once to reduce packet size. During a fresh connect from MQTT.js, the However, when MQTT.js reconnects, the |
So it seems like the Line 1174 in 37b12cb
I can work around this issue by deleting properties after client.on("connect", () => {
client.options.properties = {};
}); |
This is an automated message to let you know that this issue has If this issue is still important, you can simply comment with a Thank you for your contribution. |
Appears to be resolved with version |
I have a client, using version 4.2.5, with a subscription and once the client reconnects, the
topic
property is no longer populated when a message is received. Inspecting the packet of themessage
event shows thetopic
as empty as well. To recreate the issue, the client just needs to be kicked from the broker it is connected to by either kicking out that specific client or by restarting the broker. Both scenarios result in thetopic
not populating.Code:
Log:
AB#8825351
The text was updated successfully, but these errors were encountered: