How Does MQTT Work?
MQTT is a publish/subscribe protocol that allows edge-of-network devices to publish to a broker. Clients connect to this broker, which then mediates communication between the two devices. Each device can subscribe, or register, to particular topics. When another client publishes a message on a subscribed topic, the broker forwards the message to any client that has subscribed.
MQTT is bidirectional, and maintains stateful session awareness. If an edge-of-network device loses connectivity, all subscribed clients will be notified with the “Last Will and Testament” feature of the MQTT server so that any authorized client in the system can publish a new value back to the edge-of-network device, maintaining bidirectional connectivity.
The lightweightness and efficiency of MQTT makes it possible to significantly increase the amount of data being monitored or controlled. Prior to the invention of MQTT, approximately 80% of data was being left at remote locations, even though various lines of business could have used this data to make smarter decisions. Now MQTT makes it possible to collect, transmit, and analyze more of the data being collected.
Unlike the usual poll/response model of many protocols, which tend to unnecessarily saturate data connections with unchanging data, MQTT's publish/subscribe model maximizes the available bandwidth.
To find out more about how MQTT works go to: http://mqtt.com