-
Notifications
You must be signed in to change notification settings - Fork 25
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
MQTT 5.0 cannot subscribe: Cannot parse topic #24
Comments
If I place a console.log at console.log(this._list._bufs);
console.log(this._list._bufs.map(b => b.toString()), this._pos, result);
00 08 = 8 (= 'whatever'.length) |
Seems a problem of options: I've ended by overriding options manually, doing this: mqttConnection.on('connack', this.conAck.bind(this));
conAck(resp) {
this.mqttConnection.setOptions({
protocolVersion: 5,
});
this.mqttConnection.subscribe({
messageId: 1,
subscriptions: [{
topic: 'whatever',
qos: 0,
nl: false, // no Local MQTT 5.0 flag
rap: true, // Retain as Published MQTT 5.0 flag
rh: 1, // Retain Handling MQTT 5.0
}],
});
} |
Problem reported at mqttjs/mqtt-packet#50 |
I'm trying to use MQTT 5.0 but I'm always getting the same error:
Cannot parse topic
I've add this line in
parser.js:466
for debugging:It always fails (whatever topic I place):
If I switch to MQTT lower version it works perfectly...
The text was updated successfully, but these errors were encountered: