Skip to content

Commit d3391dc

Browse files
committed
fix canary subscription topic
1 parent 3f57c09 commit d3391dc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

canary/mqtt5/canary.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ var weightedRandom = require('weighted-random');
1010

1111
type Args = { [index: string]: any };
1212

13+
const RECEIVED_TOPIC: string = "Canary/Received/Topic";
14+
1315
const yargs = require('yargs');
1416

1517
yargs.command('*', false, (yargs: any) => {
@@ -42,7 +44,6 @@ yargs.command('*', false, (yargs: any) => {
4244
});
4345
}, main).parse();
4446

45-
let RECEIVED_TOPIC: string = "Canary/Received/Topic";
4647

4748
interface CanaryMqttStatistics {
4849
clientsUsed: number;
@@ -117,7 +118,7 @@ async function doSubscribe(context: CanaryContext) {
117118

118119
await context.clients[index].subscribe({
119120
subscriptions: [
120-
{ topicFilter: RECEIVED_TOPIC, qos: mqtt5.QoS.AtLeastOnce }
121+
{ topicFilter: topicFilter, qos: mqtt5.QoS.AtLeastOnce }
121122
]
122123
});
123124

0 commit comments

Comments
 (0)