38 Star 357 Fork 89

Ahoo-Wang/Wow

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Event-Compensation.puml 1.35 KB
一键复制 编辑 原始数据 按行查看 历史
Ahoo-Wang 提交于 2023-12-18 12:39 +08:00 . doc: add Event-Compensation.puml (#348)
@startuml EventCompensation
!include layout.puml
title
EventCompensation
end title
hide footbox
box Subscriber Service
participant EventProcessor
participant CompensationFilter
end box
box Compensation Server
participant "ExecutionFailed \n AggregateRoot" as ExecutionFailed
participant CompensationScheduler
end box
box Publisher Service
participant CompensationSaga
participant EventCompensator
end box
autonumber "[0]"
EventProcessor++
CompensationScheduler++
EventProcessor -> CompensationFilter --++ : Invoke \n(Failed)
CompensationFilter -> ExecutionFailed --++ : CreateFailed
ExecutionFailed --
CompensationScheduler -> CompensationScheduler ++ : FindToRetry \n (查询待重试的失败)
CompensationScheduler -> ExecutionFailed --: Prepare \n(准备重试)
ExecutionFailed --> CompensationSaga --++ : Prepared \n(已准备就绪)
CompensationSaga -> EventCompensator ++-- : Compensate \n(补偿)
EventCompensator --> EventProcessor++-- : DomainEvent / StateEvent
EventProcessor-> EventProcessor ++-- : Invoke \n(执行补偿)
alt success:成功
EventProcessor -> CompensationFilter ++ : Invoke \n(Success)
CompensationFilter -> ExecutionFailed++-- : ApplySuccess \n(执行成功)
ExecutionFailed--
else fail:失败
EventProcessor -> CompensationFilter ++-- : Invoke \n(Failed)
CompensationFilter -> ExecutionFailed++-- : ApplyFailed \n(执行失败)
end
@enduml
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Kotlin
1
https://gitee.com/AhooWang/Wow.git
git@gitee.com:AhooWang/Wow.git
AhooWang
Wow
Wow
main

搜索帮助