amazonka-sqs-1.6.0: Amazon Simple Queue Service SDK.

Copyright(c) 2013-2018 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Network.AWS.SQS.ChangeMessageVisibility

Contents

Description

Changes the visibility timeout of a specified message in a queue to a new value. The maximum allowed timeout value is 12 hours. Thus, 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, see Visibility Timeout in the Amazon Simple Queue Service Developer Guide .

For example, you have a message with a visibility timeout of 5 minutes. After 3 minutes, you call ChangeMessageVisiblity with a timeout of 10 minutes. At that time, the timeout for the message is extended by 10 minutes beyond the time of the ChangeMessageVisibility action. This results in a total visibility timeout of 13 minutes. You can continue to call the ChangeMessageVisibility to extend the visibility timeout to a maximum of 12 hours. If you try to extend the visibility timeout beyond 12 hours, your request is rejected.

A message is considered to be in flight after it's received from a queue by a consumer, but not yet deleted from the queue.

For standard queues, there can be a maximum of 120,000 inflight messages per queue. If you reach this limit, Amazon SQS returns the OverLimit error message. To avoid reaching the limit, you should delete messages from the queue after they're processed. You can also increase the number of queues you use to process your messages.

For FIFO queues, there can be a maximum of 20,000 inflight messages per queue. If you reach this limit, Amazon SQS returns no error messages.

Important: If you attempt to set the VisibilityTimeout to a value greater than the maximum time left, Amazon SQS returns an error. Amazon SQS doesn't automatically recalculate and increase the timeout to the maximum remaining time.

Unlike with a queue, when you change the visibility timeout for a specific message the timeout value is applied immediately but isn't saved in memory for that message. If you don't delete a message after it is received, the visibility timeout for the message reverts to the original timeout value (not to the value you set using the ChangeMessageVisibility action) the next time the message is received.

Synopsis

Creating a Request

changeMessageVisibility #

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:

  • cmvQueueURL - The URL of the Amazon SQS queue whose message's visibility is changed. Queue URLs are case-sensitive.
  • cmvReceiptHandle - The receipt handle associated with the message whose visibility timeout is changed. This parameter is returned by the ReceiveMessage action.
  • cmvVisibilityTimeout - The new value for the message's visibility timeout (in seconds). Values values: 0 to 43200 . Maximum: 12 hours.

data ChangeMessageVisibility #

See: changeMessageVisibility smart constructor.

Instances

Eq ChangeMessageVisibility # 
Data ChangeMessageVisibility # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ChangeMessageVisibility -> c ChangeMessageVisibility #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ChangeMessageVisibility #

toConstr :: ChangeMessageVisibility -> Constr #

dataTypeOf :: ChangeMessageVisibility -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c ChangeMessageVisibility) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ChangeMessageVisibility) #

gmapT :: (forall b. Data b => b -> b) -> ChangeMessageVisibility -> ChangeMessageVisibility #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ChangeMessageVisibility -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ChangeMessageVisibility -> r #

gmapQ :: (forall d. Data d => d -> u) -> ChangeMessageVisibility -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ChangeMessageVisibility -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ChangeMessageVisibility -> m ChangeMessageVisibility #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ChangeMessageVisibility -> m ChangeMessageVisibility #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ChangeMessageVisibility -> m ChangeMessageVisibility #

Read ChangeMessageVisibility # 
Show ChangeMessageVisibility # 
Generic ChangeMessageVisibility # 
Hashable ChangeMessageVisibility # 
NFData ChangeMessageVisibility # 

Methods

rnf :: ChangeMessageVisibility -> () #

AWSRequest ChangeMessageVisibility # 
ToHeaders ChangeMessageVisibility # 
ToPath ChangeMessageVisibility # 
ToQuery ChangeMessageVisibility # 
type Rep ChangeMessageVisibility # 
type Rep ChangeMessageVisibility = D1 * (MetaData "ChangeMessageVisibility" "Network.AWS.SQS.ChangeMessageVisibility" "amazonka-sqs-1.6.0-6AKMU5Om8FbICeCVgWDhlE" False) (C1 * (MetaCons "ChangeMessageVisibility'" PrefixI True) ((:*:) * (S1 * (MetaSel (Just Symbol "_cmvQueueURL") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Text)) ((:*:) * (S1 * (MetaSel (Just Symbol "_cmvReceiptHandle") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Text)) (S1 * (MetaSel (Just Symbol "_cmvVisibilityTimeout") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Int)))))
type Rs ChangeMessageVisibility # 

Request Lenses

cmvQueueURL :: Lens' ChangeMessageVisibility Text #

The URL of the Amazon SQS queue whose message's visibility is changed. Queue URLs are case-sensitive.

cmvReceiptHandle :: Lens' ChangeMessageVisibility Text #

The receipt handle associated with the message whose visibility timeout is changed. This parameter is returned by the ReceiveMessage action.

cmvVisibilityTimeout :: Lens' ChangeMessageVisibility Int #

The new value for the message's visibility timeout (in seconds). Values values: 0 to 43200 . Maximum: 12 hours.

Destructuring the Response

changeMessageVisibilityResponse :: ChangeMessageVisibilityResponse #

Creates a value of ChangeMessageVisibilityResponse with the minimum fields required to make a request.

data ChangeMessageVisibilityResponse #

See: changeMessageVisibilityResponse smart constructor.

Instances

Eq ChangeMessageVisibilityResponse # 
Data ChangeMessageVisibilityResponse # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ChangeMessageVisibilityResponse -> c ChangeMessageVisibilityResponse #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ChangeMessageVisibilityResponse #

toConstr :: ChangeMessageVisibilityResponse -> Constr #

dataTypeOf :: ChangeMessageVisibilityResponse -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c ChangeMessageVisibilityResponse) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ChangeMessageVisibilityResponse) #

gmapT :: (forall b. Data b => b -> b) -> ChangeMessageVisibilityResponse -> ChangeMessageVisibilityResponse #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ChangeMessageVisibilityResponse -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ChangeMessageVisibilityResponse -> r #

gmapQ :: (forall d. Data d => d -> u) -> ChangeMessageVisibilityResponse -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ChangeMessageVisibilityResponse -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ChangeMessageVisibilityResponse -> m ChangeMessageVisibilityResponse #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ChangeMessageVisibilityResponse -> m ChangeMessageVisibilityResponse #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ChangeMessageVisibilityResponse -> m ChangeMessageVisibilityResponse #

Read ChangeMessageVisibilityResponse # 
Show ChangeMessageVisibilityResponse # 
Generic ChangeMessageVisibilityResponse # 
NFData ChangeMessageVisibilityResponse # 
type Rep ChangeMessageVisibilityResponse # 
type Rep ChangeMessageVisibilityResponse = D1 * (MetaData "ChangeMessageVisibilityResponse" "Network.AWS.SQS.ChangeMessageVisibility" "amazonka-sqs-1.6.0-6AKMU5Om8FbICeCVgWDhlE" False) (C1 * (MetaCons "ChangeMessageVisibilityResponse'" PrefixI False) (U1 *))