Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

in SQS - Does a change in visibility timeout affects In-flight messages

I have a queue with one "heavy" message being sent/receive occasionally.

The configured visibility timeout is currently at the maximum of 12 hours.

However, I identified the message got stuck on the consumer, and I want to return it to the queue for a retry (so it will be consumed again by another consumer).

Does reducing the visibility timeout (temporarily) affect message already in-flight?

Is there any other way to force making the message visible?

like image 292
oshai Avatar asked Jan 23 '26 17:01

oshai


1 Answers

If you have the ReceiptHandle for a message, you can call change_message_visibility().

The Receipt Handle refers to the specific 'fetch' of the message, rather than the message itself. The ReceiptHandle value is provided in response to the ReceiveMessage() command, so it is only available to the code that actually retrieved the message from the queue.

like image 96
John Rotenstein Avatar answered Jan 25 '26 10:01

John Rotenstein



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!