An SQS worker usually finishes a job in 40 seconds, but some jobs take four minutes. The queue visibility timeout is 60 seconds, so another worker sometimes starts the same unfinished job. Which change best reduces premature redelivery while keeping recovery possible after a worker failure?

  1. Delete each message before starting the job and rely on the worker to finish.
  2. Increase the message retention period but leave the visibility timeout at 60 seconds.
  3. Set the visibility timeout to zero so every worker sees each job immediately.
  4. Use a suitable initial visibility timeout and extend it with ChangeMessageVisibility while long-running work remains healthy.
Sign in to start exam

Exam