By Jiaze
As the era of universal connectivity unfolds, data volumes generated by scenarios such as intelligent connected vehicles, smart industry, and smart homes are growing exponentially. How to efficiently collect data from massive IoT devices and perform real-time analysis has become a core challenge for enterprises pursuing digital transformation.
Leveraging its deep technological expertise, Alibaba Cloud has launched the "ApsaraMQ for MQTT + Kafka Real-Time Data Analytics Integrated Solution". This solution deeply integrates ApsaraMQ for MQTT, the go-to connectivity tool for mobile and device endpoints, with Kafka, the core engine for big data stream processing, delivering a highly reliable, high-performance, and operationally streamlined data processing pipeline for the IoV and IoT industries.
In a typical IoT architecture, MQTT and Kafka play the key roles of "connectivity" and "computation" respectively:
MQTT is a lightweight communication protocol based on the publish/subscribe pattern, built on top of TCP/IP. It has become the standard transport protocol in the IoT domain. The core objective of MQTT is to provide real-time, reliable messaging services for remotely connected devices using minimal code and limited bandwidth (the smallest message header is only 2 bytes, making it ideal for bandwidth-constrained networks). Three key mechanisms built into the MQTT protocol layer make it highly suitable for a wide range of connectivity and communication scenarios between endpoints and cloud services.
Alibaba Cloud ApsaraMQ for MQTT is an industry-standard protocol messaging engine purpose-built for mobile internet and IoT scenarios. It supports tens of millions of concurrent connections, millions of topics, and an ultra-lightweight protocol header, making it the definitive choice for bridging the last mile of massive device cloud connectivity.
As the cornerstone of the big data ecosystem, Alibaba Cloud ApsaraMQ for Kafka (fully managed Kafka service) employs a storage-compute separation architecture with multi-availability-zone disaster recovery, delivering exceptional adaptive elasticity. The decoupling of compute and storage layers enables new replicas to take over data and begin serving within seconds during scaling, ensuring smooth business operations even under unpredictable traffic surges, with up to 10x elastic scalability. ApsaraMQ for Kafka delivers high throughput, low latency, and infinitely scalable storage capabilities, serving as the core hub for real-time computing, stream processing, and data lake integration.
The MQTT + Kafka product combination is a widely adopted architecture pattern in real-time data processing scenarios such as IoT and IoV. It combines MQTT's lightweight, low-latency device communication capabilities with Kafka's high-throughput, scalable data stream processing power, forming an efficient, reliable, and scalable end-to-end data transmission and processing solution.

In-vehicle devices, smart hardware, and various mobile terminal applications - massive heterogeneous devices can achieve high-concurrency, low-power-consumption stable connectivity through the lightweight MQTT protocol, serving as the first stop for bringing fragmented data to the cloud. ApsaraMQ for MQTT provides multiple security authentication methods including token authentication, signature authentication, custom authentication, X.509 certificate authentication, and webhook authentication, ensuring the security of data transmitted over public network links.
ApsaraMQ for MQTT not only manages persistent connections for tens of millions of devices but also provides a powerful rule engine. The rule engine supports real-time delivery of various behavioral events from MQTT clients to Kafka, including:
The rule engine acts as an efficient orchestration brain that performs real-time filtering, cleansing, and routing of raw data reported by devices according to business requirements.
The rule engine allows users to parse MQTT message payloads using SQL-like syntax. For example, it can filter specific messages such as "temperature > 100°C" or "vehicle speed > 120 km/h" and deliver them precisely to the corresponding Kafka topics. This "edge filtering, cloud processing" pattern significantly reduces the processing load on backend systems.
Without writing complex code, specific events (such as device status, device subscription status, and message reception status) can be precisely delivered to the backend, achieving "on-demand data distribution".
Event descriptions:
Online/Offline events: Real-time awareness of device status, used for vehicle disconnection alerts or device online rate statistics.
Subscribe/Unsubscribe events: Monitoring client subscription dynamics to ensure business logic accuracy.
Message acknowledgment (ACK) events: Enabling end-to-end reliability monitoring to ensure critical commands are accurately delivered.
After initial filtering, data converges into ApsaraMQ for Kafka. As the core hub of the big data ecosystem, Kafka leverages its exceptional throughput and persistence capabilities to perform load leveling and high-reliability buffering, ensuring that data remains rock-solid even during traffic surges, and providing a steady stream of fuel for subsequent high-performance computing.
The data stream ultimately flows into core business domains, completing the transformation from data to assets:
In IoV scenarios, vehicle driving data (location, tire pressure, battery level) is reported at high frequency via the MQTT protocol. Enterprises can stream this data in real time to Kafka for analysis, building driving behavior profiles (such as hard braking and speeding analysis) or battery health monitoring systems. When the rule engine captures vehicle diagnostic trouble codes (DTCs), it can deliver them to Kafka to trigger backend alert services for immediate notification.
In smart factories, thousands of sensors are deployed across production lines. Raw data such as vibration and frequency readings are collected via MQTT, and the rule engine filters out redundant noise, sending critical data into Kafka combined with stream computing engines for predictive maintenance. Once abnormal operating parameters are detected, the system can issue repair commands before failures occur, preventing unplanned downtime.
During logistics vehicle transit, environmental temperature, humidity, and location information are critical. MQTT ensures reliable data transmission in weak network environments, while Kafka carries this time-series data for route optimization algorithms and compliance auditing. Through online/offline events, dispatch centers can monitor the real-time status of every logistics vehicle, ensuring continuity of transportation tasks.
Alibaba Cloud's "MQTT+Kafka" real-time data analytics solution helps enterprises accelerate the release of data value:
The Alibaba Cloud Messaging team will continue to deepen its expertise in the messaging domain, continuously iterating cloud-native messaging product capabilities to provide a more robust data hub for IoT applications across all industries.
For more information, feel free to join our DingTalk group (Group ID: 35228338) to get in touch with us.
Apache RocketMQ for AI: Strategic Upgrade Ushers in the Era of AI MQ
LoongCollector + ACS Agent Sandbox: Build a Production-grade AI Agent Runtime Platform
717 posts | 58 followers
FollowAlibaba Cloud Native - November 13, 2024
Alibaba Clouder - November 29, 2018
Alibaba Cloud Community - February 3, 2023
Alibaba Cloud Native - June 12, 2024
Alibaba Clouder - September 24, 2019
Alibaba Cloud Industry Solutions - January 13, 2022
717 posts | 58 followers
Follow
IoT Platform
Provides secure and reliable communication between devices and the IoT Platform which allows you to manage a large number of devices on a single IoT Platform.
Learn More
IoT Solution
A cloud solution for smart technology providers to quickly build stable, cost-efficient, and reliable ubiquitous platforms
Learn More
Big Data Consulting for Data Technology Solution
Alibaba Cloud provides big data consulting services to help enterprises leverage advanced data technology.
Learn More
Big Data Consulting Services for Retail Solution
Alibaba Cloud experts provide retailers with a lightweight and customized big data consulting service to help you assess your big data maturity and plan your big data journey.
Learn MoreMore Posts by Alibaba Cloud Native Community