Auto-sync: 2026-04-20 00:02
This commit is contained in:
25
wiki/concepts/Fan-out-Pattern.md
Normal file
25
wiki/concepts/Fan-out-Pattern.md
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
title: "Fan-out Pattern"
|
||||
type: concept
|
||||
tags:
|
||||
- Messaging
|
||||
- EDA
|
||||
- Architecture
|
||||
date: 2026-04-19
|
||||
---
|
||||
|
||||
## Definition
|
||||
Fan-out Pattern(扇出模式)是一种消息传递模式,一个事件可以同时分发给多个消费者。当一个事件需要触发多个独立的处理流程时,扇出模式可以高效实现一对多的通知机制。
|
||||
|
||||
## Implementation
|
||||
- **SNS Topic**:发布/订阅模式,一个消息发布到主题,多个订阅者接收
|
||||
- **EventBridge Rule**:基于规则将事件路由到多个目标
|
||||
|
||||
## Use Cases
|
||||
- 单个订单创建事件触发:库存更新、通知发送、数据分析、财务处理等多个独立流程
|
||||
- 用户注册事件触发:欢迎邮件、积分奖励、偏好初始化等多个独立业务逻辑
|
||||
|
||||
## Relationship
|
||||
- [[Event-Driven Architecture]] ← uses ← [[Fan-out Pattern]]
|
||||
- [[Fan-out Pattern]] ← implemented_by ← [[Amazon SNS]]
|
||||
- [[Fan-out Pattern]] ← implemented_by ← [[EventBridge]]
|
||||
Reference in New Issue
Block a user