MQTT vernacular is Gesha

1. MQTT What is that?

Message Queue Full MQTT Telemetry Transport (Message Queuing Telemetry Transport). It mainly provides a publish / subscribe model two types of messages, more simple, lightweight, easy to use, especially for restricted environment (low-bandwidth, high-latency network, network communication is unstable) news distribution, belonging Things (Internet of Thing) of a standard transmission protocol.

2. MQTT history

IBM's Andy Stanford - Clark and Arcom's Alan Neptun wrote the first version of the agreement in 1999.
IBM Corporation in 2013 to promote the Structured Information Standards Organization submitted MQTT version 3.1 specification, together with the relevant regulations, to ensure that only a few changes to specification.
April 2019, MQTT release version v5.0, is now an official OASIS standard.

3. MQTT What are the uses

Since 1999, MQTT has been widely used in various industries. Because MQTT has become the standard transport protocols of things, a lot of things devices use these protocols to transfer data, but basically all walks of life and ultimately a variety of things devices.

In addition to MQTT agreement, the agreement is also a common industrial protocol:

  • OPC UA
  • Modbus TCP /RTU
  • PROFINET
  • RS232/RS485

4. Quality of Service of MQTT

MQTT news release supports three Quality of Service (QoS):

  • At most once "(QoS == 0)
    Post completely dependent on the underlying TCP / IP network. Occur missing or duplicate messages. This level may be used in the following case, the environmental sensor data, a read record loss does not matter, because there will soon send a second time.
  • At least once "(QoS == 1)
    ensure that the message arrives, but the message is repeated may occur.
  • Only one "(QoS == 2)
    ensure that the message reaches the primary. This level may be used in the following case, in the charging system, the message is repeated or missing leads to incorrect results. A small transmission overhead is small (fixed-length header section 2 bytes), protocol exchange minimized to reduce network traffic.

5. Common MQTT server

  • Apache Apollo
  • mosquitto
  • Apache ActiveMQ
  • RabbitMQ
  • EMQTT
    above common MQTT server, emqtt, the highest concurrency, but higher cpu usage, high stability, but the message is slow. moqtuitto, send messages, high stability, cpu occupancy little higher concurrency. Other high stability is not

6. MQTT implementation

MQTT achieve agreement requires the client and server communication is completed, in the communication process, there are three protocols MQTT identity: the publisher (Publish), agent (Broker) (server), subscribers (Subscribe). Among them, news publishers and subscribers are clients, messages proxy server, news release may be subscribers simultaneously.

MQTT vernacular is Gesha

MQTT transmitted into message: topic (Topic) and a load (payload) in two parts:

(1) Topic, can be understood as the type of message, after subscriber subscription (Subscribe), you will receive the message content that topic (payload);

(2) payload, can be understood as the content of the message, the content refers to specific subscribers want to use.

Guess you like

Origin blog.51cto.com/favccxx/2469929