AWS SQS消息保留期 [英] AWS SQS message retention period

查看:195
本文介绍了AWS SQS消息保留期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据文档,AWS SQS消息保留期的最长期限为14天.在那之后,消息将从队列中删除.

According to documentation the maximum for AWS SQS message retention period is 14 days. After that time message will be deleted from the queue.

SQS是否可以在保留期限到期后不丢失这些消息?例如,目前尚不清楚,还是可以为此目的使用死信队列?

Is any way with SQS to not lose these messages after their retention period expired ? For example, it is not clear or is it possible to use Dead Letter Queue for this purpose ?

推荐答案

14天是您可以保留邮件的最大限制. 14天后,您可以将该按摩移至S3桶进行备份.您也可以使用DLQ进行破解.

Well 14 days is max limit you can keep the message. After 14 days you can move that massage to S3 Bucket for backup. Also there is a hack you can do with DLQ.

这是一个快速的技巧,您可以将该信息发送回主队列.这绝对不是最佳或推荐的选择.

Here is a quick hack where you send that message back to the main queue. This is definitely not the best or recommended option.

  1. 将主SQS队列设置为具有最大数量的实际DLQ的DLQ 收到为1.
  2. 查看DLQ中的内容(这会将消息移至主 排队,因为这是实际DLQ的DLQ)
  3. 删除设置,以使主队列不再是主队列的DLQ. 实际DLQ
  1. Set the main SQS queue as the DLQ for the actual DLQ with Maximum Receives as 1.
  2. View the content in DLQ (This will move the messages to the main queue as this is the DLQ for the actual DLQ)
  3. Remove the setting so that the main queue is no more the DLQ of the actual DLQ

这篇关于AWS SQS消息保留期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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