From a6a542f831564ad324da3fa69eedc25a01f23682 Mon Sep 17 00:00:00 2001 From: souvik Date: Fri, 17 Nov 2023 18:13:44 +0530 Subject: [PATCH] fix: use channel.address instead of id --- src/adapters/mqtt/index.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/adapters/mqtt/index.ts b/src/adapters/mqtt/index.ts index 1b85d449e..0f08b523d 100644 --- a/src/adapters/mqtt/index.ts +++ b/src/adapters/mqtt/index.ts @@ -110,7 +110,7 @@ class MqttAdapter extends Adapter { this.client.on('close', () => { this.emit('close', { connection: this.client, - channels: this.channelNames, + channels: this.channelAddresses, }) }) @@ -140,7 +140,6 @@ class MqttAdapter extends Adapter { private subscribe(channels: string[]) { channels.forEach((channel) => { const binding = this.parsedAsyncAPI.channels().get(channel).bindings().get('mqtt')?.value() - console.log(binding) this.client.subscribe(channel, { qos: binding?.qos ? binding.qos : 0, }, (err, granted) => { @@ -255,7 +254,6 @@ class MqttAdapter extends Adapter { _customAckHandler(channel, message, mqttPacket, done) { const msg = this._createMessage(mqttPacket as IPublishPacket) - console.log('Hello World') msg.on('processing:successful', () => done(MQTT_SUCCESS_REASON)) msg.on('processing:failed', () => done(MQTT_UNSPECIFIED_ERROR_REASON))