Skip to content

Commit dcfd4be

Browse files
Merge pull request #1150 from riker09/patch-1
ServerMqtt uses `url` option only
2 parents b233173 + 340486b commit dcfd4be

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

content/microservices/mqtt.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,14 @@ To use the MQTT transporter, pass the following options object to the `createMic
1919
const app = await NestFactory.createMicroservice<MicroserviceOptions>(ApplicationModule, {
2020
transport: Transport.MQTT,
2121
options: {
22-
host: 'localhost',
23-
port: 1883,
22+
url: 'mqtt://localhost:1883',
2423
},
2524
});
2625
@@switch
2726
const app = await NestFactory.createMicroservice(ApplicationModule, {
2827
transport: Transport.MQTT,
2928
options: {
30-
host: 'localhost',
31-
port: 1883,
29+
url: 'mqtt://localhost:1883',
3230
},
3331
});
3432
```
@@ -53,8 +51,7 @@ One method for creating an instance is to use use the `ClientsModule`. To create
5351
name: 'MATH_SERVICE',
5452
transport: Transport.MQTT,
5553
options: {
56-
host: 'localhost',
57-
port: 1883,
54+
url: 'mqtt://localhost:1883',
5855
}
5956
},
6057
]),

0 commit comments

Comments
 (0)