实现“仅一次交付"的良好做法是什么?Amazon SQS 的行为? [英] What is a good practice to achieve the "Exactly-once delivery" behavior with Amazon SQS?

查看:16
本文介绍了实现“仅一次交付"的良好做法是什么?Amazon SQS 的行为?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据文档><块引用>

问:每条消息我会收到多少次?

亚马逊 SQS 是旨在提供至少一次"传送其内的所有消息队列.虽然大多数时候每条消息都会被传递到您的应用程序恰好一次,您应该设计您的系统,以便多次处理一条消息不会产生任何错误或不一致.

有什么好的做法可以实现一次性交付吗?

我正在考虑使用 DynamoDB 条件写入" 作为分布式锁定机制,但...有更好的主意吗?


对此主题的一些参考:

解决方案

FIFO 队列现在可用并提供有序的,开箱即用.

https://aws.amazon.com/sqs/faqs/#fifo-队列

检查您所在地区的可用性.

According to the documentation:

Q: How many times will I receive each message?

Amazon SQS is engineered to provide "at least once" delivery of all messages in its queues. Although most of the time each message will be delivered to your application exactly once, you should design your system so that processing a message more than once does not create any errors or inconsistencies.

Is there any good practice to achieve the exactly-once delivery?

I was thinking about using the DynamoDB "Conditional Writes" as distributed locking mechanism but... any better idea?


Some reference to this topic:

解决方案

FIFO queues are now available and provide ordered, exactly once out of the box.

https://aws.amazon.com/sqs/faqs/#fifo-queues

Check your region for availability.

这篇关于实现“仅一次交付"的良好做法是什么?Amazon SQS 的行为?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆