知识卡片
请求回复用关联号匹配响应
事件驱动中若生产者必须等待处理结果,可用请求队列加回复队列实现请求回复。原书主方案在请求中记录消息ID,回复头的关联号设为该ID,生产者只接收匹配响应;另一方案为每个请求建临时回复队列,简单但大量并发时创建与删除队列会增加代理开销。这里仍有阻塞等待,不能因经过消息队列就称为完全异步。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- Event-Driven Architecture Style · 查看原书依据
The first (and most common) technique is to put a correlation ID (CID) field in the message header of the reply message
参考来源
- 位置:《Fundamentals of Software Architecture》原书第15章《Event-Driven Architecture Style》(阅读计划第18项,单元13;源文件:`OEBPS/ch15.html`)
- 结论依据:关联ID与临时队列的请求回复方案。
- 原始内容:The first (and most common) technique is to put a correlation ID (CID) field in the message header of the reply message