16
A queue-based system is reprocessing jobs after failures. How do you make it safe?
Tap to write answer
0 words | 0 charsPress Enter ↵ to reveal
Your Attempt
0 wordsRefined Model Answer
ReferenceI would make the processing idempotent and keep track of whether a job has already been completed. That can be done with a status record, a processed-job table, or a transactional write before acknowledging the queue message. The reason I choose this approach is that retries are normal and the system should handle them without duplicating side effects. I would also think about retry limits and a dead-letter queue for repeated failures. If the interviewer wants comparison, I would explain the difference between at-least-once and exactly-once semantics.