Building a High‑Throughput, Highly Available Messaging Center with RocketMQ & Elasticsearch
This article outlines the technical, business, and product goals for a messaging center, presents a prototype and functional requirements, evaluates RocketMQ and Elasticsearch as core technologies, and details the architectural design, underlying frameworks, and DevOps strategies—including Spring Cloud Gateway, Kubernetes, and Docker—to achieve 10,000 msg/s upstream throughput, 1,000 msg/s downstream delivery, and 100 % high availability.
Goal
Technical goal : Upstream message‑queue API throughput of 10,000 messages/second, downstream to third‑party platforms 1,000 messages/second (based on third‑party capacity), and 100% high availability of the message center.
Business goal : Integrate new requirements, designate the architecture team as the owner of the message center, and ensure timely response to business processing or feedback.
Product goal : Support message‑status queries, provide a simple message‑spec integration (initial development within 5 minutes), and standardize message templates.
Prototype
Functional Requirements
Support third‑party push channels such as Alibaba Cloud SMS, WeChat public account, app push, unified in‑site messages, and Enterprise WeChat (applications and personal). Include message template management, account management, message search, and batch message sending.
Technical Solution
Business deployment interaction diagram
Business core logic interaction diagram
Technical Selection
RocketMQ
Advantages: High performance, single instance can reach 100k msgs/sec; parallel push capability can be scaled via partitions.
Disadvantages: Some features not supported (e.g., message recall); certain database‑level functionalities must be omitted.
Elasticsearch
Advantages: Handles billions of records, supports keyword search with real‑time sync and good throughput.
Disadvantages: Concurrency of bulk inserts is weaker; high downstream throughput may stress ES during batch sync, requiring performance testing.
Summary Design Description
RocketMQ: normal message queue for regular delivery, retry queue with various delay mechanisms, and result queue for over‑limit or successful messages.
Elasticsearch: synchronize the three queues to maintain eventual consistency using latest timestamp verification.
MySQL: manage templates, accounts, and other basic administrative data.
Underlying Framework Design & Operations
Unified gateway: Spring Cloud Gateway or Kong, providing API‑level routing only.
Base framework: Standardize jar versions, integrate ES and RocketMQ, add real‑time alerts and performance monitoring; encapsulate interfaces, enable ES SQL‑mode for insert/query, abstract RocketMQ implementation. Reference: bsf unified base framework.
Business framework: Standard input/output, HTTP, RPC, and other business‑level tools or protocol support.
High availability: Deploy with Kubernetes & Docker, DevOps CI/CD for one‑click release, rollback, rolling updates, and zero‑downtime deployments.
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.
Java High-Performance Architecture
Sharing Java development articles and resources, including SSM architecture and the Spring ecosystem (Spring Boot, Spring Cloud, MyBatis, Dubbo, Docker), Zookeeper, Redis, architecture design, microservices, message queues, Git, etc.
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.
