Building a Scalable Message Fusion Platform for Billions of User Notifications
This article details how a rapidly growing on‑demand logistics service designed and implemented a high‑performance, extensible message fusion platform that handles massive, diverse user messages through distributed processing, visual configuration, and self‑healing mechanisms, enabling real‑time, personalized communication at scale.
Background and Challenges
As the business of the logistics platform rapidly expands, order volume and user messages surge, requiring timely and effective processing. The team built an efficient message fusion and distribution platform to address challenges such as message diversity, massive data volume (50‑100 sub‑messages per order), scalability demands, and robust exception handling for downstream service failures.
2.1 Massive Data Processing
To cope with growing order and message volumes, a comprehensive data integration strategy was adopted, combining message queues (MQ), service‑oriented architecture (SOA), and big‑data technologies. Messages are classified into transactional, delayed, and one‑time types, processed with distributed task handling, and ensured consistent via eventual consistency and self‑healing mechanisms.
Event Distribution System
The core of the platform consists of modules: message collection → classification → processing → self‑healing.
2.2 Visual Interface Requirements
A "message package" concept was introduced, comprising templates, packages, and visualizations. One package can contain multiple templates, allowing drag‑and‑drop, preview, and one‑click publishing, reducing code dependence and enabling non‑technical users to manage and distribute messages.
2.3 Platform Framework Design
The platform is divided into four modules: data collection, classification & distribution, message package management, and target audience classification. The architecture diagram is shown below.
Detailed Design
3.1 Classification and Distribution
Collected messages are classified and routed to appropriate processing flows. Components include data collection (MQ, SOA, big‑data), intelligent routing based on type, priority, and target user, feedback loops for continuous optimization, and flow control to prevent overload.
延迟消息***.kafka.** *.consumer.* *.bme_trade_order_* ***_event.action-type-3002.delay-time = 300事物消息(落库)** *.kafka.* **.consumer.**. bme_trade_ order_****_event. action-type-3004.***.delay-time = 0普通消息***.kafka.***.consumer.**. bme_ trade_order_ ****_event. action-typeOnce-3004.delay-time = 03.2 Message Processing
3.2.1 Distributed Task Handling
Implemented distributed task scheduling with XXL‑Job, assigning tasks based on message ID modulo, enabling parallel processing, monitoring, scalability, and compensation retries for failures.
3.2.2 Message Processing Flow
Adopted a distributed transaction with eventual consistency, recording process data in a database. Steps include starting processing, invoking third‑party services, handling callbacks, updating transaction status, and sending acknowledgments.
3.2.3 Self‑Healing Retry
Implemented compensation retries via XXL‑Job, with sharding for parallel processing, configurable retry strategies (exponential backoff, fixed intervals), and fallback to manual intervention when retries exhaust.
3.3 Package Management
The final stage converts processed messages into user‑visible content via visual templates and packages, supporting real‑time updates, multi‑channel distribution (APP, mini‑programs, public accounts), and personalized push based on user behavior.
3.3.1 Message Visualization
Operators configure message templates in the backend, preview the push UI, and manage distribution without coding.
3.3.2 Template Creation
Templates turn complex code into intuitive configurations, supporting online editing and instant production changes.
3.3.3 Package Combination
A package can contain multiple reusable templates, allowing flexible composition and visual management for non‑technical users.
Implementation Practice
The solution is already in production, with over 300 packages, more than 1,000 templates, and daily processing of over a hundred million messages. Benefits include an easy‑to‑use visual interface, stable massive data handling with online scaling and editing, unified code framework reducing integration cost, and self‑healing capabilities that improve system fault tolerance.
Conclusion and Outlook
There is no single “best” technology; the optimal choice depends on the scenario. Continuous iteration across industry, internet, organizations, and individuals drives the discovery of suitable technical paths. Future enhancements may focus on richer media elements, AI‑driven personalization, and stronger data monitoring and analysis to boost user engagement.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
