初识RocketMQ(上)

432 阅读2分钟

本文来自: rocketmq.apache.org/docs/rmq-ar…

RocketMQ 架构图

一、什么是RocketMQ

官方的英文:

Apache RocketMQ is a distributed messaging and streaming platform with low latency, high performance and reliability, trillion-level capacity and flexible scalability. It consists of four parts: name servers, brokers, producers and consumers. Each of them can be horizontally extended without a single Point of Failure. As shown in screenshot above.

翻译一下:

RocketMQ是一个分布式的消息和流平台,它拥有着低延迟、高性能和高可靠性、万亿级的容量和可升缩性。它包含着四部分:name servers,brokers,producers和conusmers。每个都可以横向扩展即是单一节点挂了。如上图所示。

NameServer Cluster (NameServer集群)

Name Servers provide lightweight service discovery and routing. Each Name Server records full routing information, provides corresponding reading and writing service, and supports fast storage expansion.

Name Servers提高轻量级服务发现和路由。每个Name Server记录着全量的路由信息,提供对应的读写服务,并支持快速存储的扩容。

Broker Cluster (代理集群)

Brokers take care of message storage by providing lightweight TOPIC and QUEUE mechanisms. They support the Push and Pull model, contains fault tolerance mechanism (2 copies or 3 copies), and provides strong padding of peaks and capacity of accumulating hundreds of billion messages in their original time order. In addition, Brokers provide disaster recovery, rich metrics statistics, and alert mechanisms, all of which are lacking in traditional messaging systems.

Brokers通过提供轻量级的TOPIC和QUEUE的机制来应对消息的存储。他们支持推拉模型,同时包含容错机制(2个或3个副本),并提供强大的削峰填谷和按原始时间顺序累积数千亿条消息的能力。此外,Brokers还提供灾备恢复、丰富的度量统计数据和报警机制,所有这些都是传统消息传递系统所缺少的。

Producer Cluster (生产者集群)

Producers support distributed deployment. Distributed Producers send messages to the Broker cluster through multiple load balancing modes. The sending processes support fast failure and have low latency.

Producers支持分布式部署。分布式Producers通过多种负载平衡模式向Brokers集群发送消息。发送进程支持快速故障,并且具有低延迟性。

Consumer Cluster

Consumers support distributed deployment in the Push and Pull model as well. It also supports cluster consumption and message broadcasting. It provides real-time message subscription mechanism and can meet most consumer requirements. RocketMQ’s website provides a simple quick-start guide to interested users.

Consumers在推拉模型中也支持分布式部署。它还支持集群消费和消息广播。它提供了实时消息订阅机制,能够满足大多数用户的需求。RocketMQ的网站为感兴趣的用户提供了一个简单的快速入门指南。