Imroy / pubsubclient

A client library for the ESP8266 that provides support for MQTT
MIT License
436 stars 116 forks source link

more than one Nodemcu clients can't able to get published message at a time #79

Open Rajeshtechgeek opened 7 years ago

Rajeshtechgeek commented 7 years ago

i used this library in my two Node mcu's. Both Node mcu subscribes to the same topic.But when i publish a message to that topic, only one Node mcu can able to receive at a time.I need to publish message again so that My second node mcu able to get the message.but my windows pc MQTT Lens receiving all the messsages.what will be the issue?

Urs-Eppenberger commented 7 years ago

MQTT uses a client ID to distinguish between different clients. Check the following command: mqttClient.connect(clientID) If you use the same value of clientID on both Node MCU boards, then only one is working, the other one gets the connection reset.

I'm not sure if this is the problem, but I stumbled over this myself. So it was worth a shot.