Device Discovery in MQTT: Using Retained Messages as a Service Registry
When you have some number of IoT devices connected to an MQTT broker, one of the major concerns we had is - how do we know what devices came online, what topics they publish to, and what are its other params (device details). Most solutions involve maintaining a separate device registry database. But the idea here is to use MQTT broker itself as a device registry. In typical MQTT deployments, you need to maintain device inventories separately: a database to store device metadata. Still, at this point, the path to write this info to the database write/read has to be created. ...