SQS Messages Not Deleting

我只是一个虾纸丫 提交于 2019-12-05 02:56:14

Whoops - the queue was accidentally set to defaultVisibilityTimeout=0. Changing this to a positive value fixed the problem.

This still raises a few questions though:

  1. Why did this only affect some messages? Perhaps some took longer to process?
  2. Why did Amazon return a 200 for delete when the messages weren't being deleted?
  3. Was the deletion failing because it fell outside of the 0-second window (in which case why did any deletion requests succeed?), or did they fail because another consumer had picked them up by the time the deletion request was received?

Official documentation (version 1.9.13)

IMPORTANT: It is possible you will receive a message even after you have deleted it. This might happen on rare occasions if one of the servers storing a copy of the message is unavailable when you request to delete the message. The copy remains on the server and might be returned to you again on a subsequent receive request. You should create your system to be idempotent so that receiving a particular message more than once is not a problem.

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