重复消息之间的时间段

Time period between duplicate messages

根据 SQS 的文档(强调我的):

Amazon SQS stores copies of your messages on multiple servers for redundancy and high availability. On rare occasions, one of the servers storing a copy of a message might be unavailable when you receive or delete the message. If that occurs, the copy of the message will not be deleted on that unavailable server, and you might get that message copy again when you receive messages. Because of this, you must design your application to be idempotent (i.e., it must not be adversely affected if it processes the same message more than once).

接收原始消息和重复消息之间的合理时间间隔是多少? (秒?小时?月?)

我没有具体的证据或 link 可以向您展示,但根据我使用 SQS 的经验,您谈论的时间范围在大多数情况下不到几分钟。发生重复消息的可能性是因为 activity 在非常小的时间延迟内发生在消息上,因为消息是通过非常高速的连接复制到 AWS 基础设施内的冗余队列,因此在其他情况下话,很快。它也可能会受到您指定的可见性超时的影响。