2025-01-02 10:46:09 +08:00

22 lines
1.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Apache Pulsar
## 一、架构介绍
### 1、软件架构
Apache Pulsar 是一个发布-订阅模型的消息系统,由 Broker、Apache BookKeeper、Producer、Consumer 等组件组成。
![](C:\Users\zhengchiliu\Desktop\笔记汇总\中间件\Pulsar.assets\1.png)
- Producer 消息的生产者,负责发布消息到 Topic。
- Consumer消息的消费者负责从 Topic 订阅消息。
- Broker无状态服务层负责接收和传递消息集群负载均衡等工作Broker 不会持久化保存元数据,因此可以快速的上、下线。
- Apache BookKeeper有状态持久层由一组 Bookie 存储节点组成,可以持久化地存储消息。
Apache Pulsar 在架构设计上采用了计算与存储分离的模式,消息发布和订阅相关的计算逻辑在 Broker 中完成,数据存储在 Apache BookKeeper 集群的 Bookie 节点上。
### 2、Topic与分区
![](C:\Users\zhengchiliu\Desktop\笔记汇总\中间件\Pulsar.assets\1.png)
创建一个三分区Topic每个分区的数据由N个数据分片组成每个分片3副本