In the use Message Queue for MQTTbefore, you must understand the concepts and terms related to this service and the MQTT protocol.

Basic terms


Create Purchase Message Queue for MQTTthe entity unit of the service. Message Queue for MQTTInstances all correspond to a globally unique endpoint URL. Use Message Queue for MQTTyou must create an instance in the corresponding Region and access the service through the corresponding endpoint. Create Message Queue for MQTTfor more information about the procedure for an instance, see MQTT quick start.

MQTT broker
Message Queue for MQTTThe MQTT broker is used as a server node to interact with MQTT clients and Message Queue for Apache RocketMQrespective message sending and receiving.
MQTT client
The mobile node that interacts with the MQTT Broker. The short sentence is a mobile node. Message Queue for MQTTClient.
P2P message
Message Queue for MQTTA special type of message that is provided based on the standard MQTT protocol. This type of message can be directly sent to a specified target MQTT client without subscription matching. For more information, see P2P Messaging model (MQTT).
Parent topic
MQTT is a messaging protocol that is based on the publish-subscribe model. Therefore, each message belongs to a topic. MQTT supports multiple levels of topics. A level -1 Topic is a parent Topic, Message Queue for MQTTbefore, you must create a parent Topic in the console. Message Queue for MQTTConsole, or directly in Message Queue for Apache RocketMQconsole.
A level-2 or level-3 topic is a subtopic of a parent topic in MQTT. You can directly set subtopics in the code without having to create them in the console. It should be noted that Message Queue for MQTTthe total length of a parent Topic and its subtopics cannot exceed 64 characters in. If it is too long, a client exception will occur.
Client ID

Message Queue for MQTTThe unique identifier of each Client, Message Queue for MQTTthe service will be rejected.

A client ID consists of two parts in the format of <GroupID>@@@<DeviceID>. A client ID can contain up to 64 characters and must not contain invisible characters. For more information, see Limits.

Group ID
An identifier that specifies the name of a group of nodes with identical logic and functions, representing a category of devices with the same functions. A Group ID must be Message Queue for MQTTconsole creation, the creation can be used only. For more information about how to create a Group ID, see MQTT quick start.
Device ID
A unique identifier for each device that you specify. A device ID must be globally unique, for example, the serial number of a sensor.

Network type

Endpoint URL

Message Queue for MQTTInternet and intranet endpoints are supported. We recommend that mobile terminals use Internet endpoints. Currently Message Queue for MQTTin addition to Port 1883 of the standard protocols, SSL encryption, WebSocket, and Flash are also supported. The endpoint URL is automatically allocated after an instance is created. Note down the URL for future reference. For more information about how to create an instance, see MQTT quick start.

MQTT-related terms

Message Queuing Telemetry Transport (MQTT protocol)
The MQTT protocol is an industry-standard protocol for the Internet of Things (IoT) and mobile Internet, which is suitable for data transmission between mobile devices. Message Queue for MQTTThe MQTT protocol is supported by default.
Quality of service (QoS)
An indication of the message transmission service quality. Possible QoS levels are:
  • QoS0, which indicates a maximum of one distribution.
  • QoS1, which indicates a minimum of one reaching.
  • QoS2, which indicates only one distribution.
A flag in MQTT that specifies whether the client is concerned about the previous status after a TCP connection is established. Its syntax is as follows:
  • cleanSession=true: When an offline client goes online again, it does not process any previous subscriptions or offline messages.
  • cleanSession=false: When an offline client goes online again, it always processes offline messages, while previous subscriptions remain effective.

Note the following when using QoS and cleanSession in combination:

  • MQTT requires that cleanSession of each client be fixed during connection. Otherwise, offline messages may be incorrectly determined.
  • The external messages of MQTT that require QoS2 do not currently support non-cleanSession flags. If a client subscribes to messages that require QoS2, the subscription does not take effect even if the value of cleanSession is set to false.
  • cleanSession of P2P messages is determined by the client configuration of the sender.

Table 1 lists the results of different combinations of QoS and cleanSession:

Table 1. Different combinations of QoS and cleanSession
QoS level cleanSession=true cleanSession=false
0 No offline messages are processed, and online messages are pushed only once. No offline messages are processed, and online messages are pushed only once.
1 No offline messages are processed, and online messages are guaranteed to be reached. Offline messages are processed, and all messages are guaranteed to be reached.
2 No offline messages are processed, and online messages are guaranteed to be pushed only once. Currently not supported

Solution-related terms

Real-Time Communication (RTC)
A real-time network communication method for the voice and video fields. Currently, the mainstream use cases include voice calling, video calling, and video conferencing.
RTC server
This server hosts the audio/video and related media channel services provided by Alibaba Cloud RTC.
RTC service management server
A control node in the RTC system, which is also called the RTC management service. The RTC management service must be manually created, and controls the lifecycles of all RTC sessions. The management node is normally deployed in the cloud, and is constructed using Alibaba Cloud products.
Audio/video mobile application
A terminal application that is used by an end user in the RTC system. The end user uses the application to initiate or join an audio/video calls.
Smart access point (AP)
A common network device (such as a smart router) that supports application programming and can simultaneously handle Internet access and LAN device control functions.
Digital price tags
Electronic screens that are used in malls, supermarkets, and other places. They support networking based on wireless sensor network protocols (such as Bluetooth and ZigBee) as well as smart AP nodes for networking.
Digital price tag management service
The backend service of a digital price tag system. It is used to manage the content that is displayed on the electronic screens and to manage and query manual tasks, such as price changes.
ApsaraDB for RDS
A highly available and scalable online database service provided by Alibaba Cloud. It is used to make persistent the status changes of tasks (such as price changes) in a digital price tag system.
Log Service
The log storage service launched by Alibaba Cloud, which is used in a digital price tag system to persistently store all operation logs for auditing and tracing.