Hacker News new | past | comments | ask | show | jobs | submit login

So if the "send email" step fails (temporarily), the next worker to come along will grab the same receipt and send it again?

I think a better solution would be to use a centralized queue that actually does the mail sending, and retries in case of failure.




That depends on the implementation of the queue. Most queues have a "failed/retry" concept, where they mark failed jobs to be retried in some set future point in time. So one failed job does not hold up your entire queue processing.


> a centralized queue that actually does the mail sending, and retries in case of failure.

A bit like SMTP?


not necessarily, in the first write we can update receipt status as "queued" so queue system can update to "sent" or retry




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: