zlacker

[parent] [thread] 1 comments
1. layout+(OP)[view] [source] 2021-06-12 10:49:21
Doesn’t sound like a robust solution. What if the job takes longer than your estimated expire time? Does the worker keep updating the expiry date on a background thread while doing the processing?
replies(1): >>cbo100+V7
2. cbo100+V7[view] [source] 2021-06-12 12:29:53
>>layout+(OP)
Same for any queuing system. You need to set the expiry time long enough for the expected task duration.

In SQS, for example, you use a visibility timeout set high enough that you will have time to finish the job and delete the message before SQS hand it off to another reader.

You won’t always finish in time though, so ideally jobs are idempotent.

[go to top]