知识卡片
事件与消息按语义区分
事件陈述已发生的事实,通常广播给多个订阅者且不要求回复;消息多为要执行的命令或查询,通常定向给一个处理器并要求回复。原书“订单已创建”是事件,“执行付款”是消息。广播渠道不决定语义:向全班广播“翻到145页”仍是命令。事件常用主题或流,消息常用队列;这里都是原书所述典型形式,不是绝对规则。
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- Event-Driven Architecture Style · 查看原书依据
broadcasting a command (such as turning to page 145 in the workbooks) through a publish-and-subscribe channel doesn’t turn it into an event
参考来源
- 位置:《Fundamentals of Software Architecture》原书第15章《Event-Driven Architecture Style》(阅读计划第18项;源文件:`OEBPS/ch15.html`)
- 结论依据:单元04:事件/消息语义及广播命令反例。
- 原始内容:broadcasting a command (such as turning to page 145 in the workbooks) through a publish-and-subscribe channel doesn’t turn it into an event