Also subscribe to $SYS
This commit is contained in:
@@ -65,6 +65,11 @@ export class MqttSource implements DataSource<MqttOptions> {
|
|||||||
throw new Error('mqtt subscription failed')
|
throw new Error('mqtt subscription failed')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
client.subscribe('$SYS/#', (err: Error) => {
|
||||||
|
if (err) {
|
||||||
|
throw new Error('mqtt subscription failed')
|
||||||
|
}
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
client.on('message', (topic, message, packet) => {
|
client.on('message', (topic, message, packet) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user