I have created a mqtt node js client. My connection options are as follows.
mqttOptions = {
clientId: '100',
keepAlive: 1000,
clean: false,
reconnectPeriod: '1000',
will: willMessage
};
I disconnected the server and brought it up again, while the client was still running. The client had the logic to publish every 1 second. Though the client was publishing after this reconnect, it was not receiving the message. It was subscribed to its own message topic. Since I set the clean option to be false, should it not subscribe to the topics on the reconnect and start receiving them?
Below is how I'm establishing the connection.
this.client = mqtt.connect(url, mqttOptions);
and below is how I'm subscribing.
this.client.subscribe(topic);
What am I doing wrong here? Please advice.
