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

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

问题描述

根据

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

Q: How many times will I receive each message?

Amazon SQS是 旨在提供至少一次"传递 队列.尽管大多数情况下,每条消息都会传递到 您的应用程序只运行一次,就应该设计系统,以便 多次处理一条消息不会产生任何错误或 不一致.

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?

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

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

对此主题的一些引用:

  • At-least-once delivery (Service Behavior)
  • Exactly-once delivery (Service Behavior)

推荐答案

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

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

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

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

Check your region for availability.

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

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