知识卡片

普通读书笔记卡 · 1766.f.1.a

发件箱提供至少一次投递

理解等级:中级

消息中继可轮询未发布记录,也可通过事务日志或变更流获知新记录;轮询需要适当索引。若消息已发布但标记前进程失败,重启会再次发送,所以Outbox保证至少一次而非恰好一次。下游必须考虑重复事件;不能由可靠发布推导业务动作只执行一次。

相关:[[发件箱同事务保存待发事件]]。

这张卡片看不懂?

已有反馈 · 0 / 10 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • 通信模式 · 查看原书依据

      It’s important to note that the outbox pattern guarantees delivery of the messages at least once: if the relay fails right after publishing a message but before marking it as published in the database, the same message will be published again in the next iteration. Next, we’ll take a look at how we can leverage

    参考来源

    - 位置:《Learning Domain-Driven Design》第9章《通信模式》(来源项目:book-sources;源文件:extracted/Learning Domain-Driven Design/_epub-src/OEBPS/ch09.html) - 结论依据:原文围绕本卡所述机制给出定义、适用条件及相关取舍,以下摘录为直接依据。 - 原始内容:It’s important to note that the outbox pattern guarantees delivery of the messages at least once: if the relay fails right after publishing a message but before marking it as published in the database, the same message will be published again in the next iteration. Next, we’ll take a look at how we can leverage