How to prevent duplicate SQS Messages?

前端 未结 6 1695
时光取名叫无心
时光取名叫无心 2021-01-30 03:10

What is the best way to prevent duplicate messages in Amazon SQS? I have a SQS of domains waiting to be crawled. before I add a new domain to the SQS I can check with the saved

6条回答
  •  温柔的废话
    2021-01-30 03:38

    There is no API level way of preventing duplicate messages to be posted to a SQS queue. You would need to handle this at application level I am afraid.

    You can use a DynamoDB table to store your Domain Names waiting to be crawled and only add them to the queue if they are not in DynamoDB for example.

提交回复
热议问题