Skip to content

Commit

Permalink
fix: use channel.address instead of id
Browse files Browse the repository at this point in the history
  • Loading branch information
Souvikns committed Nov 17, 2023
1 parent 822268f commit a6a542f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/adapters/mqtt/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ class MqttAdapter extends Adapter {
this.client.on('close', () => {
this.emit('close', {
connection: this.client,
channels: this.channelNames,
channels: this.channelAddresses,
})
})

Expand Down Expand Up @@ -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) => {
Expand Down Expand Up @@ -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))
Expand Down

0 comments on commit a6a542f

Please sign in to comment.