4 ms·
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
by 1024core 10y ago
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.
- srd 10y agoThat 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.
- ChoHag 10y ago> a centralized queue that actually does the mail sending, and retries in case of failure. A bit like SMTP?
- lazyant 10y agonot necessarily, in the first write we can update receipt status as "queued" so queue system can update to "sent" or retry