Auto-sync: update nexus workspace
This commit is contained in:
34
wiki/concepts/Fan-Out-Pattern.md
Normal file
34
wiki/concepts/Fan-Out-Pattern.md
Normal file
@@ -0,0 +1,34 @@
|
||||
---
|
||||
title: "Fan-Out Pattern"
|
||||
type: concept
|
||||
tags:
|
||||
- EDA
|
||||
- Architecture
|
||||
- Messaging
|
||||
- Cloud
|
||||
last_updated: 2026-04-14
|
||||
---
|
||||
|
||||
## Aliases
|
||||
- Fan-out
|
||||
- 扇出模式
|
||||
|
||||
## Definition
|
||||
扇出模式(Fan-Out Pattern)指将一个事件同时分发给多个消费者(订阅者)的模式。在事件驱动架构中,生产者发布一条消息,通过事件代理自动分发给所有感兴趣的消费者。
|
||||
|
||||
## Implementation
|
||||
- **SNS Topic**:发布到 SNS Topic,多个 SQS 队列或 Lambda 函数订阅同一主题
|
||||
- **EventBridge Rules**:基于规则路由,将事件分发给不同的目标服务
|
||||
|
||||
## Use Cases
|
||||
- 同一订单事件触发库存服务、支付服务、通知服务
|
||||
- 日志事件同时发送到 CloudWatch Logs、S3 和第三方监控系统
|
||||
- 数据同步:同一数据变更同步到多个下游系统
|
||||
|
||||
## Best Practices
|
||||
- SNS Topic 订阅多个 SQS 队列实现可靠的消息传递
|
||||
- EventBridge 每个订阅者使用单一规则,便于维护和调试
|
||||
- 消费者独立扩展,不影响其他消费者
|
||||
|
||||
## Sources
|
||||
- [[public-cloud-learning-sessions-opentext-event-driven-architecture-part-2-2024091]]
|
||||
Reference in New Issue
Block a user