The IBM Websphere Message Queue technology was first conceived in 1993 to address problems in independent and non-concurrent distributed systems to securely communicate. A derivative of the WebSphere Message Queue was authored by Andy Stanford-Clark and Arlen Nipper at IBM in 1999 to address the particular constraints of connecting remote oil and gas pipelines over a satellite connection. That protocol became known as the MQTT.
The goals of this IP-based transport protocol are:
MQTT provides for these requirements. A way to think of the protocol is best defined by the standard body which presents a very well-defined summary of the protocol:
MQTT is a lightweight publish/subscribe protocol that is intended for machine to machine (M2M) communication. The key advantages of MQTT are its persistent connection, low overhead (2 bytes) and its three QoS levels that ensure either that a message is sent, a message is received, or a message is received exactly once.
The MQTT broker is a service that runs on the data collector and passes data between the MQTT publisher that is executed within the sensor or edge device and the MQTT Subscriber that reads the publisher’s data and writes it into the data store. Popular brokers include Mosquitto, HiveMQ, and RabbitMQ, any of which can be used within the IoT Stack.
MQTT may have many producers and many consumers, as shown in the following Picture 2 below.
Picture 2. MQTT publish-subscribe model and topology.
Clients run on the edge and publish and/or subscribe to topics that are managed by the MQTT Broker. Here, two topics are considered: humidity and temperature. A client may subscribe to multiple topics. The figure represents smart sensors that include enough resources to manage their own MQTT client and edge routers that provide the MQTT client services on behalf of sensors or appliances that are not MQTT-enabled.
The maximum allowable packet size in MQTT is 256 MB, which allows for an extremely large payload. Note, however, that the maximum data payload size is cloud and broker-dependent.