重复消息的消息 ID
Message IDs on 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).
是否保证这些重复消息具有相同的 (SQS) 消息 ID?
是的,它们将具有相同的 ID,因此如果您要跟踪已处理的内容,请保留一份列表(在缓存或数据库中)您所做的事情 'recently' 应该工作正常。
根据 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).
是否保证这些重复消息具有相同的 (SQS) 消息 ID?
是的,它们将具有相同的 ID,因此如果您要跟踪已处理的内容,请保留一份列表(在缓存或数据库中)您所做的事情 'recently' 应该工作正常。