From dfb5b85c323ab22aa8901cbd2d6ae9cb845134dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Chello=E2=80=9D?= Date: Thu, 19 Sep 2024 21:29:02 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=86=E5=B8=83=E5=BC=8F=E4=BA=8B=E4=BB=B6?= =?UTF-8?q?=E6=80=BB=E7=BA=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- notes/helloshop/distributed-events.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/notes/helloshop/distributed-events.md b/notes/helloshop/distributed-events.md index ae644d3..531eb78 100644 --- a/notes/helloshop/distributed-events.md +++ b/notes/helloshop/distributed-events.md @@ -2,16 +2,21 @@ ## 抽象分布式总线 -使用设计模式,将分布式总线抽象为一个接口,定义了总线的基本功能。 +使用设计模式,将分布式总线的使用方式进行抽象,定义了总线的基本功能。 ![event-bus-abstraction](https://oss.xcode.me/notes/helloshop/event-bus-abstraction.svg) ## 基于事件总线的组件 +使用组件化的方式实现分布式事件总线,将总线的实现细节封装在组件中。 + ![event-bus-component](https://oss.xcode.me/notes/helloshop/event-bus-component.svg) -https://github.com/dotnet/eShop/tree/main/src/EventBusRabbitMQ +基于 RabbbitMQ 实现:https://github.com/dotnet/eShop/tree/main/src/EventBusRabbitMQ ## 事件总线的 Dapr 实现 +Dapr 是一个开源的分布式应用程序运行时,发布和订阅模块使微服务能够使用事件驱动架构的消息相互通信,Dapr 提供了一个事件总线的实现,使用 Dapr 发布事件,提供 Dapr 订阅终结点,将消息路由到不同的事件处理程序。 + + ![event-bus-endpoint](https://oss.xcode.me/notes/helloshop/event-bus-endpoint.svg)