MQTT

<< Click to Display Table of Contents >>

Navigation:  Components > IoT >

MQTT

MQTT (Message Queuing Telemetry Transport)

 

Message Queuing Telemetry Transport (MQTT) is an open network protocol for machine-to-machine (M2M) communication that enables the transmission of telemetry data in the form of messages between devices, despite high delays or limited networks. Corresponding devices range from sensors and actuators, mobile phones, embedded systems in vehicles or laptops to fully developed computers. The MQTT protocol is also known by older names such as "WebSphere MQTT" (WMQTT), "SCADA Protocol" or "MQ Integrator SCADA Device Protocol" (MQIsdp). The Internet Assigned Numbers Authority (IANA) reserves ports 1883 and 8883 for MQTT, and MQTT messages can be encrypted using the TLS protocol.

 

Interestingly, an MQTT server ("broker") holds the entire data state of its communication partners, and thus can be used as a state database. Thus, it is possible to connect small unperformant MQTT devices to an MQTT broker, where the devices collect data and/or receive commands, while a complex state picture is only created on the MQTT broker and can be evaluated here or by a powerful communication partner. Thus, location interventions can be transmitted from one or more powerful instances to the MQTT broker and propagated to the individual devices. As a result, MQTT is very well suited for automation solutions and is widely used in the field of IoT due to its ease of use.

 

MQTT is a client-server protocol. After establishing a connection, clients send messages to the server ("broker") with a topic that classifies the message hierarchically; for example, building/floor/room/temperature or socket/room/11/momentary power. Clients can subscribe to these topics, and the server forwards the received messages to the corresponding subscribers.

 

 
MQTT-Publish-Subscribe

 

 

Messages always consist of a topic and the message content. Messages are sent with a definable Quality of Service (QoS): at most once (0 = the message is sent once and may not arrive if the connection is interrupted), at least once (1 = the message is sent until reception is confirmed and may arrive at the recipient several times) and exactly once (2 = this ensures that the message arrives exactly once even if the connection is interrupted). In addition, the retain flag can be used to instruct the server to temporarily store the message for this topic. Clients that subscribe to this topic will receive the cached message first.

 

When connecting, clients can define a "last will and testament" in the form of a message (will). If the connection to the client is lost unexpectedly, this message is published and sent to the corresponding subscribers in the process.

 

 

 

oEisBaer MQTT Client

 

 

 

oEisBaer MQTT Broker

 

 

 

oEisBaer MQTT Bridge