visibility_timeout Property
The visibility duration for messages in the queue.
Syntax
def get_visibility_timeout() -> int: ... def set_visibility_timeout(value: int) -> None: ...
visibility_timeout = property(get_visibility_timeout, set_visibility_timeout)
Default Value
-1
Remarks
Visibility timeout is used to guard against multiple delivery. Successive calls to list_messages on a queue will not return any message again until the timeout expires, after which the message may reappear unless deleted with delete_message.
A default visibility timeout is configured when a queue is created using create_queue, it can also be altered when a message is added using create_message or when they are retrieved using list_messages.
The default value for visibility_timeout is -1, which notifies the component that you would like to use the default behavior for the current Queue.
Note: Unlike messages received from standard queues, messages received from FIFO queues can only be deleted within their visibility_timeout. Attempting to call delete_message for a message received from a FIFO queue after its visibility_timeout has expired will cause the server to return an error. Keep this in mind when picking a visibility_timeout value to create a FIFO queue and/or retrieve messages with.