1

I'm setting up Celery using Amazon SQS and I came across the issue mentioned here.

The article mentions:

under rare circumstances you might receive a previously deleted message again. This can occur in the rare situation in which a DeleteMessage operation doesn't delete all copies of a message because one of the servers in the distributed Amazon SQS system isn't available at the time of the deletion. That message copy can then be delivered again. You should design your application so that no errors or inconsistencies occur if you receive a deleted message again.

I was curious what strategies people are using to handle this? I wouldn't want to send out duplicate emails.

Greg
  • 45,306
  • 89
  • 231
  • 297
  • Did you see [this follow up post](http://atodorov.org/blog/2013/12/11/idempotent-django-email-sender-with-amazon-sqs-and-memcache/) by the same author? It looks like they used a cache to prevent the same message from being processed twice. – Alasdair Mar 10 '16 at 20:12
  • Thanks. I didn't see that. I feel like I'm missing something in that code. It seems like you can only send an email once in that time period, period. Like only one email. Maybe it's a good start though if I could incorporate the task id? – Greg Mar 10 '16 at 20:17

0 Answers0