When a consumer polls a message from a queue, the message is "invisible"'to other consumers for a defined period. The Visibility Timeout.
You can set between 0 seconds and 12 hours (default to 30 seconds).
If you set too high (15 minutes) and consumer fails to process the message, you must wait a long time before processing the message again.
If you set too low (30 seconds) and consumer needs time to process the message (2 minutes), another consumer will receive the message will be processed more than once.
ChangeMessageVisibility API to change the visibility while processing a message.
DeleteMessage API to tell SQS the message was successfully processed.