知识卡片
按业务结果控制派生事件粒度
原书欺诈检测例中,一个“已检查”事件让所有消费者再读载荷判断结果;拆成“发现欺诈”和“未发现欺诈”,可让各订阅者按事件名选择响应。但若个人资料一次更新的地址、电话等每个字段都各发一条事件,系统会充满细碎流,形成“蚊群”反模式。可按一次业务结果发布“资料已更新”,在载荷里保留必要前后值;粒度由处理结果而非字段数决定。
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- Event-Driven Architecture Style · 查看原书依据
We recommend focusing on the outcome of the processing or state change to avoid the Swarm of Gnats antipattern
参考来源
- 位置:《Fundamentals of Software Architecture》原书第15章《Event-Driven Architecture Style》(阅读计划第18项,单元10;源文件:`OEBPS/ch15.html`)
- 结论依据:欺诈检查与资料更新的事件粒度。
- 原始内容:We recommend focusing on the outcome of the processing or state change to avoid the Swarm of Gnats antipattern