ApsaraMQ for MQTT is a lightweight message-oriented middleware for mobile Internet and Internet of Things (IoT) applications. Traditional message-oriented middleware transmits messages between microservices. ApsaraMQ for MQTT instead transmits messages between devices and the cloud, enabling bidirectional communication at scale.
Examples:
A fleet of temperature sensors reports readings every 5 seconds to a cloud analytics dashboard.
A backend service pushes firmware update commands to thousands of smart devices simultaneously.
Two mobile apps exchange instant messages through the MQTT protocol without routing through a backend server.
Terms
| Term | Definition |
|---|---|
| Topic | The primary classifier for messages. Producers send messages to topics, and consumers subscribe to topics to receive messages. |
| Producer | The publisher that creates and sends messages to a topic. |
| Consumer | The subscriber that receives and processes messages from a topic. |
| Message | The data payload sent by a producer to a topic and delivered to one or more consumers. |
| Rule | A resource that exchanges data between ApsaraMQ for MQTT and other Alibaba Cloud services. |
Messaging models
ApsaraMQ for MQTT supports two messaging models.
Device-to-cloud communication
Devices connect to ApsaraMQ for MQTT and exchange data with cloud applications or other Alibaba Cloud services. This model covers scenarios such as:
A smart thermostat reports temperature, humidity, and battery level to a cloud monitoring dashboard every 10 seconds.
A backend service sends configuration updates or reboot commands to devices in the field.

Device-to-device communication
Devices communicate directly with each other through ApsaraMQ for MQTT. Both producers and consumers connect over the MQTT protocol. This model covers scenarios such as:
Users chat through an instant messaging app with sub-second message delivery.
A mobile app controls a smart home device -- adjusting lights or locking doors -- without routing through a backend server.

Developer roles
These models map to two developer roles:
| Role | Scope | SDK reference |
|---|---|---|
| Device developer | Build client-side applications that run on IoT devices or mobile endpoints. | Download the SDK |
| Cloud developer | Build server-side applications that process device data or send commands. | Obtain SDKs for the control API |
Benefits
Broad protocol and platform support
ApsaraMQ for MQTT is compatible with SDKs that support MQTT V3.1.1 and supports WebSocket connections. This spans most mobile development platforms and programming languages, enabling seamless migration from existing MQTT implementations.
Millisecond-level messaging at massive scale
| Metric | Capability |
|---|---|
| Latency | Messages delivered within milliseconds |
| Connected devices | Tens of millions of concurrent device connections |
| Concurrent messages | Millions of concurrent messages |
| Throughput | Trillions of message transactions |
| Architecture | Distributed design with no single-point bottlenecks; unlimited horizontal scale-out for each component |
Device-level security
| Capability | Description |
|---|---|
| Device-level permission management | Manage permissions at the individual device level |
| Temporary tokens | Issue short-lived credentials for device authentication |
| Encrypted transport | Secure all data in transit with Transport Layer Security (TLS) V1.2 |
Integration with ApsaraMQ for RocketMQ
Exchange messages between ApsaraMQ for MQTT and ApsaraMQ for RocketMQ for reliable, high-throughput two-way communication between devices and cloud applications. This integration bridges lightweight device messaging with enterprise-grade message queuing.
Scenarios
ApsaraMQ for MQTT serves a wide range of mobile Internet and IoT use cases:
| Scenario | Example |
|---|---|
| Mobile live-streaming | Deliver real-time interactive messages -- comments, likes, and gifts -- alongside video streams to millions of concurrent viewers. |
| Internet of Vehicles (IoV) | Collect telemetry from connected vehicles (speed, fuel level, location) and push over-the-air updates or navigation commands. |
| Payment | Transmit transaction notifications and status updates between payment terminals and processing backends in real time. |
| Smart catering | Connect kitchen display systems, ordering tablets, and management platforms for real-time order synchronization across locations. |
| Instant messaging | Deliver chat messages between mobile or web clients with sub-second latency. |

Get started
Purchase an ApsaraMQ for MQTT instance on the ApsaraMQ for MQTT buy page.