知识卡片
事件载荷也是服务契约
服务向消息队列发布的数据结构,会约束订阅方的解析和业务判断;即使没有公开的 REST 文档,它仍是跨服务契约。用事件复制数据能隔开数据库结构,却仍需管理事件模式演进、顺序和最终一致性。
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
原书出处
参考来源
- 位置:《Principles of Software Architecture Modernization》第2章《Anti-Patterns: Lack of Isolation》(源文件:`_epub-src/OPS/ch02.xhtml`,归一化正文 [16927:21116))
- 结论依据:原文指出消息队列中的数据即使未通过 API 网关发布也构成契约,变更它仍可打破订阅方;顺序与一致性是随之而来的设计代价。
- 原始内容:The data itself is the contract; even though it does not come with a swagger definition or get published via an API gateway, the data is just as critical. Often, these unrecognized contracts can be missed or ignored, and we call them hidden contracts.