← 返回刚才阅读的位置

知识卡片

普通读书笔记卡 · 1980.z.1.b.1.b

本地事务不含外部发送

理解等级:高级

没有代理事务时,可在数据库同一事务更新业务状态和消费offset,恢复时读取这组一致位置,确保本地累计不会因重放重复生效。但直接发送到代理仍可能重复或漏发,不属于此本地事务;需要可靠输出时可事务写Outbox再至少一次发布,并让下游幂等。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • Stateful Streaming · 查看原书依据

      A microservice can leverage the transactional capabilities of its state store instead of the event broker to perform effectively once processing. This requires moving the consumer group’s offset management from the event broker and into the data service, allowing a single stateful transaction to atomically update both the state and input offsets. Any changes made to the state coincide completely with those made to the consumer offsets, which maintains consistency

    参考来源

    - 位置:《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;规范化段落起句:A microservice can leverage the transactional) - 结论依据:原文对该对象的定义、运行说明或对比支持以下归纳:没有代理事务时,可在数据库同一事务更新业务状态和消费offset,恢复时读取这组一致位置,确保本地累计不会因重放重复生效。本卡同时保留其适用条件与失败边界。 - 原始内容:A microservice can leverage the transactional capabilities of its state store instead of the event broker to perform effectively once processing. This requires moving the consumer group’s offset management from the event broker and into the data service, allowing a single stateful transaction to atomically update both the state and input offsets. Any changes made to the state coincide completely with those made to the consumer offsets, which maintains consistency