Message Queue for MQTT is applicable to two messaging models: messaging between client sides and messaging between client sides and backend services. These two models respectively involve client-side and backend application developers. This topic provides guides for these developers.
Message Queue for MQTT supports the following message publish-subscribe models.
- The automatic publish-subscribe model on the device side
This model is applicable to data communication between mobile apps or devices. Its typical scenarios include chatting between users by using instant messaging technology, and app-based control over smart devices. In this model, message producers and consumers are distributed in the mobile environment and connect to Message Queue for MQTT over the MQTT protocol.
- The interaction model between devices and backend services
In this model, interactions between Message Queue for MQTTand other Alibaba Cloud services are implemented by using rules. This model is applicable to the following scenarios.
- A device publishes messages and the backend service subscribes to the messages: This scenario is applicable to data reporting. A typical example is reporting the status data of smart devices or reporting the data collected by mobile apps. In this model, messages are published by massive mobile devices and subscribed to by backend services. Data is generally published based on business scenarios, and backend services are usually deployed in the cloud, such as Alibaba Cloud ECS that consumes reported data in batches. Message Queue for MQTT exports data to other Alibaba Cloud services based on data outbound rules.
- The backend service publishes messages and a device subscribes to the messages: This scenario is applicable to command issuance. A typical example is controlling smart devices from a cloud or pushing messages from a mobile app. In this model, messages are published by backend apps, which are usually deployed in the cloud, such as Alibaba Cloud ECS whose message subscribers are mobile devices or apps. Message Queue for MQTT subscribes to the data from other Alibaba Cloud services based on data inbound rules.
For more information about the guide for client-side application developers, see Download the SDK. The guide includes client-side API references, SDK references, and permission management content.
For more information about the guide for backend application developers, see Obtain an OpenAPI SDK. The guide includes cloud-side API references, SDK references, and permission management content.