Message Queue for MQTT is lightweight messaging middleware provided by Alibaba Cloud for mobile Internet and IoT scenarios. Traditional messaging middleware is generally used between microservices. Message Queue for MQTT, which is designed for IoT scenarios, transmits messages between devices and clouds and realizes the Internet of Everything in a real sense. This topic describes the messaging models, benefits, and scenarios of Message Queue for MQTT.
- Topic: the topic of messages. It is a level-1 message type. A producer sends messages to a topic.
- Producer: the producer or publisher who produces and sends messages to a topic.
- Consumer: the consumer or subscriber who subscribes to and consumes messages from a topic.
- Message: the data that is sent by a producer to a topic and finally transmitted to a consumer.
- Rule: the resource that implements data exchanges between Message Queue for MQTT and other Alibaba Cloud services.
Message Queue for MQTT supports the following two messaging models:
- Model of interaction between devices and backend service applications
In this model, Message Queue for MQTT connects devices to backend service applications to implement two-way communication between the devices and the backend service applications. Devices can use Message Queue for MQTT to directly communicate with backend service applications. Devices can also use Message Queue for MQTT to implement messaging with other Alibaba Cloud services.
A typical scenario of this model is to report the status data of smart devices to the cloud or control the delivery of commands from backend service applications to smart devices.
- Model of messaging between devices
This model is applicable to data communication between mobile applications or devices. Its typical scenarios include chatting between users by using instant messaging technology, and application-based control over smart devices. In this model, message producers and consumers are distributed in the mobile environment and connected to Message Queue for MQTT over the Message Queuing Telemetry Transport (MQTT) protocol.
Based on these two models, developers who use Message Queue for MQTT are divided into device developers and cloud developers. For more information about the custom development for the developers, see Device developer guide and Cloud developer guide.
Message Queue for MQTT supports a range of protocols, languages, and platforms, and is widely used in mobile Internet and IoT fields. This service is applicable to various scenarios, such as mobile live streaming, Internet of Vehicles, finance and payment, smart catering, and instant messaging.