If you want to obtain the numerical changes of sensors in real time, each sensor has a unique data_id.
The front end is using mqtt to combine multiple data_ids into an array and subscribe as a topic.
But it only successfully subscribes The first data_id was retrieved, but the others did not respond.
What should I do if I want to subscribe to multiple topics on the front end?
PHPz2017-05-19 10:30:56
It is not recommended that js directly subscribe to mqtt. The server should subscribe to mqtt. In addition, multiple client ids are required to subscribe to multiple topics.