nest
nest copied to clipboard
nest microservice is not connecting
I'm submitting a...
[ ] Regression
[ ] Bug report
[ ] Feature request
[*] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.
Current behavior
i am trying to make communications between 2 apps with nestjs microservices (mqtt) i have the following connection code:
const app = await NestFactory.create(AppModule);
app.connectMicroservice({
transport: Transport.MQTT,
options: {
host: 'mqtt',
port: 1883,
},
});
app.startAllMicroservicesAsync();
await app.listen(3000);
just for testing, i also have anther app with the following code:
const mqtt = require('mqtt')
this.client = mqtt.connect('mqtt://mqtt');
When i am checking the mqtt server connections, i cant see the nestJS application i only see the other connection and therefore they cannot communicate. breaking my head over this for a while
my bad, i used
options: {
host: 'mqtt',
port: 1883,
},
instead of URL, silly me
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.