chaining of callbacks
This commit is contained in:
@ -7,13 +7,13 @@ class Dispatcher {
|
||||
constructor() {
|
||||
this._mqttClient = new mqtt.MqttClient()
|
||||
|
||||
this._mqttClient.register('IoT/test', (message: any) : any => {
|
||||
this._mqttClient.register('IoT/test', 'print', (message: any) : any => {
|
||||
log.info("Callback for IoT/test")
|
||||
log.info(`message is ${message}`)
|
||||
return `<<${message}>>`
|
||||
})
|
||||
this._mqttClient.register('IoT/Device/#', mqtt.passThrough)
|
||||
this._mqttClient.register('IoT/Device/#', mqtt.passThrough)
|
||||
this._mqttClient.register('IoT/Device/#', 'null1', mqtt.passThrough)
|
||||
this._mqttClient.register('IoT/Device/#', 'null2', mqtt.passThrough)
|
||||
}
|
||||
|
||||
exec() : void {
|
||||
|
Reference in New Issue
Block a user