AWS SQS message retention period

女生的网名这么多〃 提交于 2019-11-30 23:47:07

问题


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

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 ?


回答1:


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. 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


来源:https://stackoverflow.com/questions/38725962/aws-sqs-message-retention-period

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!