知识卡片

支付系统案例卡 · 1980.z.1.b.1.a

事务绑定状态进度输出

理解等级:高级

若代理支持相应事务,可把消费offset、状态changelog与输出事实原子提交,失败后从最后提交边界恢复,避免库存累计与进度分离。消费者还必须遵守事务隔离,未提交数据不可成为有效输入。这保证的是事务边界内的可见效果,处理代码可重跑,外部HTTP或邮件副作用并不自动包含。

关联:[[重复流水造成库存错算]]。

这张卡片看不懂?

已有反馈 · 0 / 10 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • Stateful Streaming · 查看原书依据

      Effectively once processing can be facilitated by any event broker that supports transactions. With this approach, any output events, updates made to internal state backed by a changelog, and the incrementing of the consumer offsets are wrapped together within a single atomic transaction. This is possible only if all three of these updates are stored within their own specific event stream in the broker. The offset update, the changelog update,

    参考来源

    - 位置:《Building Event-Driven Microservices Leveraging Organizational Data at Scale (Adam Bellemare)》第07章《Stateful Streaming》(来源项目:a19c7933-4eda-4176-aebd-30fe7e1ad292;源文件:extracted/Building Event-Driven Microservices Leveraging Organizational Data at Scale (Adam Bellemare)/_epub-src/OEBPS/ch07.xhtml;规范化段落起句:Effectively once processing can be facilitated) - 结论依据:原文对该对象的定义、运行说明或对比支持以下归纳:若代理支持相应事务,可把消费offset、状态changelog与输出事实原子提交,失败后从最后提交边界恢复,避免库存累计与进度分离。本卡同时保留其适用条件与失败边界。 - 原始内容:Effectively once processing can be facilitated by any event broker that supports transactions. With this approach, any output events, updates made to internal state backed by a changelog, and the incrementing of the consumer offsets are wrapped together within a single atomic transaction. This is possible only if all three of these updates are stored within their own specific event stream in the broker. The offset update, the changelog update,