Design and Technical Specification for a High‑Throughput Messaging Center
This document outlines the technical, business, and product goals, functional requirements, architecture diagrams, technology selections, and detailed design and operational plans for building a highly available messaging center capable of handling 10,000 messages per second upstream and 1,000 messages per second downstream.
Technical Goal: Achieve an upstream API throughput of 10,000 messages/second to the message queue and downstream delivery of 1,000 messages/second to third‑party platforms, while ensuring 100% high availability of the message center.
Business Goal: Integrate new requirements, designate the architecture team as the owner of the message center, and provide timely business response and feedback.
Product Goal: Support message status queries, enable rapid (≈5 minutes) integration of simple message specifications, and standardize message template handling.
Functional Requirements: Support third‑party push channels such as Alibaba Cloud SMS, WeChat public account, app push, internal site messages, and Enterprise WeChat (both application and personal). Include features like message template management, account management, message search, and batch sending.
Technical Solution: Uses Spring Cloud Gateway/Kong as a unified API gateway, RocketMQ for normal, retry, and result queues, Elasticsearch for synchronizing queue data with eventual consistency, and MySQL for template and account management. Deployment relies on Kubernetes, Docker, and DevOps for one‑click release, rollback, rolling updates, and zero‑downtime deployments.
Technology Selection:
RocketMQ – high performance (up to 100k msgs/sec) and scalable via partitioning; drawback: some features not supported, messages cannot be withdrawn once queued.
Elasticsearch – handles billions of records for keyword search with good real‑time performance; drawback: concurrent insert performance may be limited under high load.
High‑Level Design:
Design three RocketMQ queues: normal delivery, retry (with various delay mechanisms), and result (success/failure) queues.
Synchronize all three queues to Elasticsearch, ensuring eventual consistency via latest timestamp verification.
Use MySQL solely for managing templates, accounts, and other basic administrative data.
Infrastructure and Operations:
Unified gateway: Spring Cloud Gateway or Kong for API routing.
Base framework: Wrap selected JAR versions, Elasticsearch (SQL mode), and RocketMQ with a unified abstraction layer (reference: csx‑bsf‑all on Gitee).
Business framework: Provide standard HTTP/RPC input‑output utilities.
High availability: Deploy on Kubernetes & Docker with DevOps pipelines to enable one‑click publish, rollback, rolling updates, and uninterrupted releases.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Architecture Digest
Focusing on Java backend development, covering application architecture from top-tier internet companies (high availability, high performance, high stability), big data, machine learning, Java architecture, and other popular fields.
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.
