2 ms·
For this kind of issue I stick to at-least-once, and then use a lot of band-aid: - Each worker has to hook to a database where a record keep the state of the t
by Xixi 12y ago
For this kind of issue I stick to at-least-once, and then use a lot of band-aid:
- Each worker has to hook to a database where a record keep the state of the transaction: ready, processing, success or failure. With a good old SELECT FOR UPDATE a transaction will never be done more than once.
- Timestamps and alerts ensure that if the worker fails dramatically (leaving the task as "processing"), a human will check and update the task accordingly.
It has proven pretty resilient so far... but at very small scales.