知识卡片
支付去重绑定业务结果
以稳定交易标识识别同一支付请求,记录处理状态及结果,让重复请求复用结果。去重检查、状态修改及业务副作用必须协调,先查Redis再扣款再记键之间崩溃仍可能重复;TTL到期也会失去保护。该原文示意不足以证明端到端恰好一次。对应[[重复支付事件会重复扣款]]。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- Event-driven Systems · 查看原书依据
For example, in a payment processing system, you would not want to charge a customer twice for the same transaction if an event is accidentally duplicated. A deduplication key based on the transaction ID would prevent this.
参考来源
- 位置:《Building Distributed Systems Designing scalable architectures with microservices, event-driven patterns, and robust deployment…》第06章《Event-driven Systems》(来源项目book-sources;源文件:extracted/Building Distributed Systems Designing scalable architectures with microservices, event-driven patterns, and robust deployment…/_epub-src/OPS/ch06.xhtml)
- 结论依据:原文的机制或对比支持以下核心判断:以稳定交易标识识别同一支付请求,记录处理状态及结果,让重复请求复用结果。 本卡将相邻说明中的适用限制保留为解释。
- 原始内容:For example, in a payment processing system, you would not want to charge a customer twice for the same transaction if an event is accidentally duplicated. A deduplication key based on the transaction ID would prevent this.