知识卡片
快照须绑定消费进度
快照恢复要同时恢复状态和与之匹配的消费offset。非幂等累计若从过早位置开始会重复应用,从过晚位置开始会漏事实,因此应把offset与状态一同事务保存。幂等覆盖可容忍重复读取,但重叠范围仍需确保覆盖所有未包含事件。仅有数据库备份而没有消费边界,不是完整的事件服务恢复方案。
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- Stateful Streaming · 查看原书依据
If the stored state is not idempotent and any duplicate events are not acceptable, then you should store your consumer’s partition offsets alongside the data within the data store. This ensures that the consumer offsets and the associated state are consistent. When state is restored from the snapshot, the consumer can set its consumer group offsets to those found in the snapshot from the exact time that the snapshot was
参考来源
- 位置:《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;规范化段落起句:If the stored state is not idempotent)
- 结论依据:原文对该对象的定义、运行说明或对比支持以下归纳:快照恢复要同时恢复状态和与之匹配的消费offset。本卡同时保留其适用条件与失败边界。
- 原始内容:If the stored state is not idempotent and any duplicate events are not acceptable, then you should store your consumer’s partition offsets alongside the data within the data store. This ensures that the consumer offsets and the associated state are consistent. When state is restored from the snapshot, the consumer can set its consumer group offsets to those found in the snapshot from the exact time that the snapshot was