gpt4 book ai didi

amazon-web-services - 设计您的应用程序以处理Amazon SQS中的FIFO

转载 作者:行者123 更新时间:2023-12-04 00:12:41 25 4
gpt4 key购买 nike

从Amazon SQS常见问题页面:

Amazon SQS does not guarantee FIFO access to messages in Amazon SQS queues, mainly because of the distributed nature of the Amazon SQS. If you require specific message ordering, you should design your application to handle it.



我的问题是-如何以这种方式设计应用程序?

最佳答案

您可以在发送消息时设置消息序列计数器。在接收端,如果顺序正确,您可以继续处理消息。如果出现乱序消息,请等到正确的消息出现为止(直到将消息存储在按序列号排序的列表中),然后再处理正确的序列消息和介于其间的其他消息。

关于amazon-web-services - 设计您的应用程序以处理Amazon SQS中的FIFO,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22323396/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com