Copyright | (c) 2013-2015 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
Changes the visibility timeout of a specified message in a queue to a new value. The maximum allowed timeout value you can set the value to is 12 hours. This means you can't extend the timeout of a message in an existing queue to more than a total visibility timeout of 12 hours. (For more information visibility timeout, see Visibility Timeout in the Amazon SQS Developer Guide.)
For example, let's say you have a message and its default message
visibility timeout is 30 minutes. You could call
ChangeMessageVisiblity
with a value of two hours and the effective
timeout would be two hours and 30 minutes. When that time comes near you
could again extend the time out by calling ChangeMessageVisiblity, but
this time the maximum allowed timeout would be 9 hours and 30 minutes.
There is a 120,000 limit for the number of inflight messages per queue. Messages are inflight after they have been received from the queue by a consuming component, but have not yet been deleted from the queue. If you reach the 120,000 limit, you will receive an OverLimit error message from Amazon SQS. To help avoid reaching the limit, you should delete the messages from the queue after they have been processed. You can also increase the number of queues you use to process the messages.
If you attempt to set the VisibilityTimeout
to an amount more than the
maximum time left, Amazon SQS returns an error. It will not
automatically recalculate and increase the timeout to the maximum time
remaining.
Unlike with a queue, when you change the visibility timeout for a
specific message, that timeout value is applied immediately but is not
saved in memory for that message. If you don't delete a message after
it is received, the visibility timeout for the message the next time it
is received reverts to the original timeout value, not the value you set
with the ChangeMessageVisibility
action.
See: AWS API Reference for ChangeMessageVisibility.
- changeMessageVisibility :: Text -> Text -> Int -> ChangeMessageVisibility
- data ChangeMessageVisibility
- cmvQueueURL :: Lens' ChangeMessageVisibility Text
- cmvReceiptHandle :: Lens' ChangeMessageVisibility Text
- cmvVisibilityTimeout :: Lens' ChangeMessageVisibility Int
- changeMessageVisibilityResponse :: ChangeMessageVisibilityResponse
- data ChangeMessageVisibilityResponse
Creating a Request
changeMessageVisibility Source
Creates a value of ChangeMessageVisibility
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
data ChangeMessageVisibility Source
See: changeMessageVisibility
smart constructor.
Request Lenses
cmvQueueURL :: Lens' ChangeMessageVisibility Text Source
The URL of the Amazon SQS queue to take action on.
cmvReceiptHandle :: Lens' ChangeMessageVisibility Text Source
The receipt handle associated with the message whose visibility timeout should be changed. This parameter is returned by the ReceiveMessage action.
cmvVisibilityTimeout :: Lens' ChangeMessageVisibility Int Source
The new value (in seconds - from 0 to 43200 - maximum 12 hours) for the message's visibility timeout.
Destructuring the Response
changeMessageVisibilityResponse :: ChangeMessageVisibilityResponse Source
Creates a value of ChangeMessageVisibilityResponse
with the minimum fields required to make a request.
data ChangeMessageVisibilityResponse Source
See: changeMessageVisibilityResponse
smart constructor.