From af54b54d4b967bb391c354f4a0e0f72ad616d197 Mon Sep 17 00:00:00 2001 From: liruyu Date: Thu, 19 May 2022 09:57:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=AE=A2=E5=8D=95=E8=B6=85?= =?UTF-8?q?=E6=97=B6=E5=85=B3=E9=97=AD=E6=96=B9=E6=A1=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Solution.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Solution.md b/Solution.md index 960274a..b9d82fd 100644 --- a/Solution.md +++ b/Solution.md @@ -7302,5 +7302,17 @@ Apache ShardingSphere 是多接入端共同组成的生态圈。 通过混合使 +# 订单超时关闭 +在电商、支付等领域,往往会有这样的场景,用户下单后放弃支付了,那这笔订单会在指定的时间段后进行关闭操作,细心的你一定发现了像某宝、某东都有这样的逻辑,而且时间很准确,误差在1s内;那他们是怎么实现的呢? + +**一般的做法有如下几种** + +- 定时任务关闭订单 +- rocketmq延迟队列 +- rabbitmq死信队列 +- 时间轮算法 +- redis过期监听 + +参考文档:https://juejin.cn/post/6987233263660040206