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 two messaging models:

  • 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 the 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 MQTT protocol.model_1
  • Model of interaction between devices and backend service applications

    In this model, interactions between Message Queue for MQTT and other Alibaba Cloud services are implemented based on rules. This model is applicable to the following scenarios.

    • A device publishes messages and a backend service application subscribes to the messages: This scenario is applicable to data reporting. A typical example is to report the status data of smart devices or report the data collected by mobile applications. In this model, a massive number of mobile devices publish messages and backend service applications subscribe to the messages. Data is generally published based on business scenarios. Message subscribers are backend service applications, which are usually deployed in Alibaba Cloud services, such as ECS. Backend service applications consume reported data in batches. Message Queue for MQTT exports data to other Alibaba Cloud services based on data outbound rules.
    • A backend service application publishes messages and a device subscribes to the messages: This scenario is applicable to command issuance. A typical example is to control smart devices from a cloud or push messages from a mobile application. In this model, backend service applications publish messages. These applications are usually deployed in Alibaba Cloud services, such as ECS. Message subscribers are mobile devices or applications. Message Queue for MQTT subscribes to the data from other Alibaba Cloud services based on data inbound rules.
    model_2
Note The rules apply only to data exchanges with Message Queue for Apache RocketMQ. For more information about rules, see Manage 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.