aws-0.24.4: Amazon Web Services (AWS) for Haskell

Safe Haskell | None
Language | Haskell2010

Aws.Sqs.Commands.Message

Contents

- User Message Attributes
- Send Message
- Delete Message
- Receive Message
- Change Message Visiblity

Synopsis

- type UserMessageAttributeCustomType = Text
- data UserMessageAttributeValue
  - = UserMessageAttributeString (Maybe UserMessageAttributeCustomType) Text
  - | UserMessageAttributeNumber (Maybe UserMessageAttributeCustomType) Scientific
  - | UserMessageAttributeBinary (Maybe UserMessageAttributeCustomType) ByteString
- type UserMessageAttributeName = Text
- type UserMessageAttribute = (UserMessageAttributeName, UserMessageAttributeValue)
- data SendMessage = SendMessage {
  - smMessage :: !Text
  - smQueueName :: !QueueName
  - smAttributes :: ![UserMessageAttribute]
  - smDelaySeconds :: !(Maybe Int)
  }
- data SendMessageResponse = SendMessageResponse {
  - smrMD5OfMessageBody :: !Text
  - smrMessageId :: !MessageId
  - smrMD5OfMessageAttributes :: !(Maybe Text)
  }
- data DeleteMessage = DeleteMessage {
  - dmReceiptHandle :: !ReceiptHandle
  - dmQueueName :: !QueueName
  }
- data DeleteMessageResponse = DeleteMessageResponse
- data Message = Message {
  - mMessageId :: !Text
  - mReceiptHandle :: !ReceiptHandle
  - mMD5OfBody :: !Text
  - mBody :: Text
  - mAttributes :: ![(MessageAttribute, Text)]
  - mMD5OfMessageAttributes :: !(Maybe Text)
  - mUserMessageAttributes :: ![UserMessageAttribute]
  }
- data ReceiveMessage = ReceiveMessage {
  - rmVisibilityTimeout :: !(Maybe Int)
  - rmAttributes :: ![MessageAttribute]
  - rmMaxNumberOfMessages :: !(Maybe Int)
  - rmUserMessageAttributes :: ![UserMessageAttributeName]
  - rmQueueName :: !QueueName
  - rmWaitTimeSeconds :: !(Maybe Int)
  }
- data ReceiveMessageResponse = ReceiveMessageResponse {
  - rmrMessages :: ![Message]
  }
- data ChangeMessageVisibility = ChangeMessageVisibility {
  - cmvReceiptHandle :: !ReceiptHandle
  - cmvVisibilityTimeout :: !Int
  - cmvQueueName :: !QueueName
  }
- data ChangeMessageVisibilityResponse = ChangeMessageVisibilityResponse

# User Message Attributes

type UserMessageAttributeCustomType = Text Source #

You can append a custom type label to the supported data types (String, Number, and Binary) to create custom data types. This capability is similar to type traits in programming languages. For example, if you have an application that needs to know which type of number is being sent in the message, then you could create custom types similar to the following: Number.byte, Number.short, Number.int, and Number.float. Another example using the binary data type is to use Binary.gif and Binary.png to distinguish among different image file types in a message or batch of messages. The appended data is optional and opaque to Amazon SQS, which means that the appended data is not interpreted, validated, or used by Amazon SQS. The Custom Type extension has the same restrictions on allowed characters as the message body.

data UserMessageAttributeValue Source #

Message Attribute Value

The user-specified message attribute value. For string data types, the value attribute has the same restrictions on the content as the message body. For more information, see SendMessage.

Name, type, and value must not be empty or null. In addition, the message body should not be empty or null. All parts of the message attribute, including name, type, and value, are included in the message size restriction, which is currently 256 KB (262,144 bytes).

The supported message attribute data types are String, Number, and Binary. You can also provide custom information on the type. The data type has the same restrictions on the content as the message body. The data type is case sensitive, and it can be up to 256 bytes long.

http://docs.aws.amazon.com/AWSSimpleQueueService/2012-11-05/APIReference/API_MessageAttributeValue.html

Constructors

UserMessageAttributeString (Maybe UserMessageAttributeCustomType) Text | Strings are Unicode with UTF-8 binary encoding.

UserMessageAttributeNumber (Maybe UserMessageAttributeCustomType) Scientific

Numbers are positive or negative integers or floating point numbers. Numbers have sufficient range and precision to encompass most of the possible values that integers, floats, and doubles typically support. A number can have up to 38 digits of precision, and it can be between 10^-128 to 10^+126. Leading and trailing zeroes are trimmed.

UserMessageAttributeBinary (Maybe UserMessageAttributeCustomType) ByteString | Binary type attributes can store any binary data, for example, compressed data, encrypted data, or images.

#### Instances

Instances details

Read UserMessageAttributeValue Source # |
Instance details Defined in Aws.Sqs.Commands.Message Methods readsPrec :: Int -> ReadS UserMessageAttributeValue Source # readList :: ReadS [UserMessageAttributeValue] Source # readPrec :: ReadPrec UserMessageAttributeValue Source # readListPrec :: ReadPrec [UserMessageAttributeValue] Source #
Show UserMessageAttributeValue Source # |
Instance details Defined in Aws.Sqs.Commands.Message Methods showsPrec :: Int -> UserMessageAttributeValue -> ShowS Source # show :: UserMessageAttributeValue -> String Source # showList :: [UserMessageAttributeValue] -> ShowS Source #
Eq UserMessageAttributeValue Source # |
Instance details Defined in Aws.Sqs.Commands.Message Methods (==) :: UserMessageAttributeValue -> UserMessageAttributeValue -> Bool Source # (/=) :: UserMessageAttributeValue -> UserMessageAttributeValue -> Bool Source #
Ord UserMessageAttributeValue Source # |

Instance details

Defined in Aws.Sqs.Commands.Message

Methods

compare :: UserMessageAttributeValue -> UserMessageAttributeValue -> Ordering Source #

(<) :: UserMessageAttributeValue -> UserMessageAttributeValue -> Bool Source #

(<=) :: UserMessageAttributeValue -> UserMessageAttributeValue -> Bool Source #

(>) :: UserMessageAttributeValue -> UserMessageAttributeValue -> Bool Source #

(>=) :: UserMessageAttributeValue -> UserMessageAttributeValue -> Bool Source #

max :: UserMessageAttributeValue -> UserMessageAttributeValue -> UserMessageAttributeValue Source #

min :: UserMessageAttributeValue -> UserMessageAttributeValue -> UserMessageAttributeValue Source #

type UserMessageAttributeName = Text Source #

The message attribute name can contain the following characters: A-Z, a-z, 0-9, underscore(_), hyphen(-), and period (.). The name must not start or end with a period, and it should not have successive periods. The name is case sensitive and must be unique among all attribute names for the message. The name can be up to 256 characters long. The name cannot start with "AWS." or "Amazon." (or any variations in casing) because these prefixes are reserved for use by Amazon Web Services.

type UserMessageAttribute = (UserMessageAttributeName, UserMessageAttributeValue) Source #

Message Attribute

Name, type, and value must not be empty or null. In addition, the message body should not be empty or null. All parts of the message attribute, including name, type, and value, are included in the message size restriction, which is currently 256 KB (262,144 bytes).

http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/SQSMessageAttributes.html#SQSMessageAttributes.DataTypes

NOTE

The Amazon SQS API reference calls this MessageAttribute. The Haskell bindings use this term for what the Amazon documentation calls just Attributes. In order to limit backward compatibility issues we keep the terminology of the Haskell bindings and call this type UserMessageAttributes.

# Send Message

data SendMessage Source #

Delivers a message to the specified queue. With Amazon SQS, you now have the ability to send large payload messages that are up to 256KB (262,144 bytes) in size. To send large payloads, you must use an AWS SDK that supports SigV4 signing. To verify whether SigV4 is supported for an AWS SDK, check the SDK release notes.

IMPORTANT

The following list shows the characters (in Unicode) allowed in your message, according to the W3C XML specification. For more information, go to http://www.w3.org/TR/REC-xml/#charsets If you send any characters not included in the list, your request will be rejected.

    #x9 | #xA | #xD | [#x20 to #xD7FF] | [#xE000 to #xFFFD] | [#x10000 to #x10FFFF]

http://docs.aws.amazon.com/AWSSimpleQueueService/2012-11-05/APIReference/API_SendMessage.html

Constructors

SendMessage |

Fields

- smMessage :: !Text

  The message to send. String maximum 256 KB in size.

- smQueueName :: !QueueName

  The URL of the Amazon SQS queue to take action on.

- smAttributes :: ![UserMessageAttribute]

  Each message attribute consists of a Name, Type, and Value.

- smDelaySeconds :: !(Maybe Int)

  The number of seconds (0 to 900 - 15 minutes) to delay a specific message. Messages with a positive DelaySeconds value become available for processing after the delay time is finished. If you don't specify a value, the default value for the queue applies.

#### Instances

Instances details

SignQuery SendMessage Source # |

Instance details

Defined in Aws.Sqs.Commands.Message

Associated Types

type ServiceConfiguration SendMessage |
Instance details Defined in Aws.Sqs.Commands.Message type ServiceConfiguration SendMessage = SqsConfiguration

Methods

signQuery :: SendMessage -> ServiceConfiguration SendMessage queryType -> SignatureData -> SignedQuery Source #

Read SendMessage Source # |
Instance details Defined in Aws.Sqs.Commands.Message Methods readsPrec :: Int -> ReadS SendMessage Source # readList :: ReadS [SendMessage] Source # readPrec :: ReadPrec SendMessage Source # readListPrec :: ReadPrec [SendMessage] Source #
Show SendMessage Source # |
Instance details Defined in Aws.Sqs.Commands.Message Methods showsPrec :: Int -> SendMessage -> ShowS Source # show :: SendMessage -> String Source # showList :: [SendMessage] -> ShowS Source #
Eq SendMessage Source # |
Instance details Defined in Aws.Sqs.Commands.Message Methods (==) :: SendMessage -> SendMessage -> Bool Source # (/=) :: SendMessage -> SendMessage -> Bool Source #
Ord SendMessage Source # |

Instance details

Defined in Aws.Sqs.Commands.Message

Methods

compare :: SendMessage -> SendMessage -> Ordering Source #

(<) :: SendMessage -> SendMessage -> Bool Source #

(<=) :: SendMessage -> SendMessage -> Bool Source #

(>) :: SendMessage -> SendMessage -> Bool Source #

(>=) :: SendMessage -> SendMessage -> Bool Source #

max :: SendMessage -> SendMessage -> SendMessage Source #

min :: SendMessage -> SendMessage -> SendMessage Source #

Transaction SendMessage SendMessageResponse Source # |
Instance details Defined in Aws.Sqs.Commands.Message
type ServiceConfiguration SendMessage Source # |
Instance details Defined in Aws.Sqs.Commands.Message type ServiceConfiguration SendMessage = SqsConfiguration

data SendMessageResponse Source #

At http://docs.aws.amazon.com/AWSSimpleQueueService/2012-11-05/APIReference/API_SendMessageResult.html all fields of `SendMessageResult` are denoted as optional. At http://queue.amazonaws.com/doc/2012-11-05/QueueService.wsdl all fields are specified as required.

The actual service seems to treat at least `smrMD5OfMessageAttributes` as optional.

Constructors

SendMessageResponse |

Fields

- smrMD5OfMessageBody :: !Text

  An MD5 digest of the non-URL-encoded message body string. This can be used to verify that Amazon SQS received the message correctly. Amazon SQS first URL decodes the message before creating the MD5 digest. For information about MD5, go to http://www.faqs.org/rfcs/rfc1321.html.

- smrMessageId :: !MessageId

  An element containing the message ID of the message sent to the queue.

- smrMD5OfMessageAttributes :: !(Maybe Text)

  An MD5 digest of the non-URL-encoded message attribute string. This can be used to verify that Amazon SQS received the message correctly. Amazon SQS first URL decodes the message before creating the MD5 digest. For information about MD5, go to http://www.faqs.org/rfcs/rfc1321.html.

#### Instances

Instances details

AsMemoryResponse SendMessageResponse Source # |

Instance details

Defined in Aws.Sqs.Commands.Message

Associated Types

type MemoryResponse SendMessageResponse |
Instance details Defined in Aws.Sqs.Commands.Message type MemoryResponse SendMessageResponse = SendMessageResponse

Methods

loadToMemory :: SendMessageResponse -> ResourceT IO (MemoryResponse SendMessageResponse) Source #

Read SendMessageResponse Source # |
Instance details Defined in Aws.Sqs.Commands.Message Methods readsPrec :: Int -> ReadS SendMessageResponse Source # readList :: ReadS [SendMessageResponse] Source # readPrec :: ReadPrec SendMessageResponse Source # readListPrec :: ReadPrec [SendMessageResponse] Source #
Show SendMessageResponse Source # |
Instance details Defined in Aws.Sqs.Commands.Message Methods showsPrec :: Int -> SendMessageResponse -> ShowS Source # show :: SendMessageResponse -> String Source # showList :: [SendMessageResponse] -> ShowS Source #
Eq SendMessageResponse Source # |
Instance details Defined in Aws.Sqs.Commands.Message Methods (==) :: SendMessageResponse -> SendMessageResponse -> Bool Source # (/=) :: SendMessageResponse -> SendMessageResponse -> Bool Source #
Ord SendMessageResponse Source # |

Instance details

Defined in Aws.Sqs.Commands.Message

Methods

compare :: SendMessageResponse -> SendMessageResponse -> Ordering Source #

(<) :: SendMessageResponse -> SendMessageResponse -> Bool Source #

(<=) :: SendMessageResponse -> SendMessageResponse -> Bool Source #

(>) :: SendMessageResponse -> SendMessageResponse -> Bool Source #

(>=) :: SendMessageResponse -> SendMessageResponse -> Bool Source #

max :: SendMessageResponse -> SendMessageResponse -> SendMessageResponse Source #

min :: SendMessageResponse -> SendMessageResponse -> SendMessageResponse Source #

ResponseConsumer r SendMessageResponse Source # |

Instance details

Defined in Aws.Sqs.Commands.Message

Associated Types

type ResponseMetadata SendMessageResponse |
Instance details Defined in Aws.Sqs.Commands.Message type ResponseMetadata SendMessageResponse = SqsMetadata

Methods

responseConsumer :: Request -> r -> IORef (ResponseMetadata SendMessageResponse) -> HTTPResponseConsumer SendMessageResponse Source #

Transaction SendMessage SendMessageResponse Source # |
Instance details Defined in Aws.Sqs.Commands.Message
type MemoryResponse SendMessageResponse Source # |
Instance details Defined in Aws.Sqs.Commands.Message type MemoryResponse SendMessageResponse = SendMessageResponse
type ResponseMetadata SendMessageResponse Source # |
Instance details Defined in Aws.Sqs.Commands.Message type ResponseMetadata SendMessageResponse = SqsMetadata

# Delete Message

data DeleteMessage Source #

Deletes the specified message from the specified queue. You specify the message by using the message's receipt handle and not the message ID you received when you sent the message. Even if the message is locked by another reader due to the visibility timeout setting, it is still deleted from the queue. If you leave a message in the queue for longer than the queue's configured retention period, Amazon SQS automatically deletes it.

NOTE

The receipt handle is associated with a specific instance of receiving the message. If you receive a message more than once, the receipt handle you get each time you receive the message is different. When you request DeleteMessage, if you don't provide the most recently received receipt handle for the message, the request will still succeed, but the message might not be deleted.

IMPORTANT

It is possible you will receive a message even after you have deleted it. This might happen on rare occasions if one of the servers storing a copy of the message is unavailable when you request to delete the message. The copy remains on the server and might be returned to you again on a subsequent receive request. You should create your system to be idempotent so that receiving a particular message more than once is not a problem.

http://docs.aws.amazon.com/AWSSimpleQueueService/2012-11-05/APIReference/API_DeleteMessage.html

Constructors

DeleteMessage |

Fields

- dmReceiptHandle :: !ReceiptHandle

  The receipt handle associated with the message to delete.

- dmQueueName :: !QueueName

  The URL of the Amazon SQS queue to take action on.

#### Instances

Instances details

SignQuery DeleteMessage Source # |

Instance details

Defined in Aws.Sqs.Commands.Message

Associated Types

type ServiceConfiguration DeleteMessage |
Instance details Defined in Aws.Sqs.Commands.Message type ServiceConfiguration DeleteMessage = SqsConfiguration

Methods

signQuery :: DeleteMessage -> ServiceConfiguration DeleteMessage queryType -> SignatureData -> SignedQuery Source #

Read DeleteMessage Source # |
Instance details Defined in Aws.Sqs.Commands.Message Methods readsPrec :: Int -> ReadS DeleteMessage Source # readList :: ReadS [DeleteMessage] Source # readPrec :: ReadPrec DeleteMessage Source # readListPrec :: ReadPrec [DeleteMessage] Source #
Show DeleteMessage Source # |
Instance details Defined in Aws.Sqs.Commands.Message Methods showsPrec :: Int -> DeleteMessage -> ShowS Source # show :: DeleteMessage -> String Source # showList :: [DeleteMessage] -> ShowS Source #
Eq DeleteMessage Source # |
Instance details Defined in Aws.Sqs.Commands.Message Methods (==) :: DeleteMessage -> DeleteMessage -> Bool Source # (/=) :: DeleteMessage -> DeleteMessage -> Bool Source #
Ord DeleteMessage Source # |

Instance details

Defined in Aws.Sqs.Commands.Message

Methods

compare :: DeleteMessage -> DeleteMessage -> Ordering Source #

(<) :: DeleteMessage -> DeleteMessage -> Bool Source #

(<=) :: DeleteMessage -> DeleteMessage -> Bool Source #

(>) :: DeleteMessage -> DeleteMessage -> Bool Source #

(>=) :: DeleteMessage -> DeleteMessage -> Bool Source #

max :: DeleteMessage -> DeleteMessage -> DeleteMessage Source #

min :: DeleteMessage -> DeleteMessage -> DeleteMessage Source #

Transaction DeleteMessage DeleteMessageResponse Source # |
Instance details Defined in Aws.Sqs.Commands.Message
type ServiceConfiguration DeleteMessage Source # |
Instance details Defined in Aws.Sqs.Commands.Message type ServiceConfiguration DeleteMessage = SqsConfiguration

data DeleteMessageResponse Source #

Constructors

DeleteMessageResponse |

#### Instances

Instances details

AsMemoryResponse DeleteMessageResponse Source # |

Instance details

Defined in Aws.Sqs.Commands.Message

Associated Types

type MemoryResponse DeleteMessageResponse |
Instance details Defined in Aws.Sqs.Commands.Message type MemoryResponse DeleteMessageResponse = DeleteMessageResponse

Methods

loadToMemory :: DeleteMessageResponse -> ResourceT IO (MemoryResponse DeleteMessageResponse) Source #

Read DeleteMessageResponse Source # |
Instance details Defined in Aws.Sqs.Commands.Message Methods readsPrec :: Int -> ReadS DeleteMessageResponse Source # readList :: ReadS [DeleteMessageResponse] Source # readPrec :: ReadPrec DeleteMessageResponse Source # readListPrec :: ReadPrec [DeleteMessageResponse] Source #
Show DeleteMessageResponse Source # |
Instance details Defined in Aws.Sqs.Commands.Message Methods showsPrec :: Int -> DeleteMessageResponse -> ShowS Source # show :: DeleteMessageResponse -> String Source # showList :: [DeleteMessageResponse] -> ShowS Source #
Eq DeleteMessageResponse Source # |
Instance details Defined in Aws.Sqs.Commands.Message Methods (==) :: DeleteMessageResponse -> DeleteMessageResponse -> Bool Source # (/=) :: DeleteMessageResponse -> DeleteMessageResponse -> Bool Source #
Ord DeleteMessageResponse Source # |

Instance details

Defined in Aws.Sqs.Commands.Message

Methods

compare :: DeleteMessageResponse -> DeleteMessageResponse -> Ordering Source #

(<) :: DeleteMessageResponse -> DeleteMessageResponse -> Bool Source #

(<=) :: DeleteMessageResponse -> DeleteMessageResponse -> Bool Source #

(>) :: DeleteMessageResponse -> DeleteMessageResponse -> Bool Source #

(>=) :: DeleteMessageResponse -> DeleteMessageResponse -> Bool Source #

max :: DeleteMessageResponse -> DeleteMessageResponse -> DeleteMessageResponse Source #

min :: DeleteMessageResponse -> DeleteMessageResponse -> DeleteMessageResponse Source #

ResponseConsumer r DeleteMessageResponse Source # |

Instance details

Defined in Aws.Sqs.Commands.Message

Associated Types

type ResponseMetadata DeleteMessageResponse |
Instance details Defined in Aws.Sqs.Commands.Message type ResponseMetadata DeleteMessageResponse = SqsMetadata

Methods

responseConsumer :: Request -> r -> IORef (ResponseMetadata DeleteMessageResponse) -> HTTPResponseConsumer DeleteMessageResponse Source #

Transaction DeleteMessage DeleteMessageResponse Source # |
Instance details Defined in Aws.Sqs.Commands.Message
type MemoryResponse DeleteMessageResponse Source # |
Instance details Defined in Aws.Sqs.Commands.Message type MemoryResponse DeleteMessageResponse = DeleteMessageResponse
type ResponseMetadata DeleteMessageResponse Source # |
Instance details Defined in Aws.Sqs.Commands.Message type ResponseMetadata DeleteMessageResponse = SqsMetadata

# Receive Message

data Message Source #

An Amazon SQS message.

In http://docs.aws.amazon.com/AWSSimpleQueueService/2012-11-05/APIReference/API_Message.html all elements are denoted as optional. In http://queue.amazonaws.com/doc/2012-11-05/QueueService.wsdl all elements except for the attributes are specified as required. At least for the field `mMD5OfMessageAttributes` the the service is not always returning a value and therefor we make this field optional.

Constructors

Message |

Fields

- mMessageId :: !Text

  A unique identifier for the message. Message IDs are considered unique across all AWS accounts for an extended period of time.

- mReceiptHandle :: !ReceiptHandle

  An identifier associated with the act of receiving the message. A new receipt handle is returned every time you receive a message. When deleting a message, you provide the last received receipt handle to delete the message.

- mMD5OfBody :: !Text

  An MD5 digest of the non-URL-encoded message body string.

- mBody :: Text

  The message's contents (not URL-encoded).

- mAttributes :: ![(MessageAttribute, Text)]

  SenderId, SentTimestamp, ApproximateReceiveCount, and/or ApproximateFirstReceiveTimestamp. SentTimestamp and ApproximateFirstReceiveTimestamp are each returned as an integer representing the epoch time in milliseconds.

- mMD5OfMessageAttributes :: !(Maybe Text)

  An MD5 digest of the non-URL-encoded message attribute string. This can be used to verify that Amazon SQS received the message correctly. Amazon SQS first URL decodes the message before creating the MD5 digest. For information about MD5, go to http://www.faqs.org/rfcs/rfc1321.html.

- mUserMessageAttributes :: ![UserMessageAttribute]

  Each message attribute consists of a Name, Type, and Value.

#### Instances

Instances details

Read Message Source # |
Instance details Defined in Aws.Sqs.Commands.Message Methods readsPrec :: Int -> ReadS Message Source # readList :: ReadS [Message] Source # readPrec :: ReadPrec Message Source # readListPrec :: ReadPrec [Message] Source #
Show Message Source # |
Instance details Defined in Aws.Sqs.Commands.Message Methods showsPrec :: Int -> Message -> ShowS Source # show :: Message -> String Source # showList :: [Message] -> ShowS Source #
Eq Message Source # |
Instance details Defined in Aws.Sqs.Commands.Message Methods (==) :: Message -> Message -> Bool Source # (/=) :: Message -> Message -> Bool Source #
Ord Message Source # |
Instance details Defined in Aws.Sqs.Commands.Message Methods compare :: Message -> Message -> Ordering Source # (<) :: Message -> Message -> Bool Source # (<=) :: Message -> Message -> Bool Source # (>) :: Message -> Message -> Bool Source # (>=) :: Message -> Message -> Bool Source # max :: Message -> Message -> Message Source # min :: Message -> Message -> Message Source #

data ReceiveMessage Source #

Retrieves one or more messages, with a maximum limit of 10 messages, from the specified queue. Long poll support is enabled by using the WaitTimeSeconds parameter. For more information, see Amazon SQS Long Poll in the Amazon SQS Developer Guide.

Short poll is the default behavior where a weighted random set of machines is sampled on a ReceiveMessage call. This means only the messages on the sampled machines are returned. If the number of messages in the queue is small (less than 1000), it is likely you will get fewer messages than you requested per ReceiveMessage call. If the number of messages in the queue is extremely small, you might not receive any messages in a particular ReceiveMessage response; in which case you should repeat the request.

For each message returned, the response includes the following:

Message body

- MD5 digest of the message body. For information about MD5, go to http://www.faqs.org/rfcs/rfc1321.html.
- Message ID you received when you sent the message to the queue.
- Receipt handle.
- Message attributes.
- MD5 digest of the message attributes.

The receipt handle is the identifier you must provide when deleting the message. For more information, see Queue and Message Identifiers in the Amazon SQS Developer Guide.

You can provide the VisibilityTimeout parameter in your request, which will be applied to the messages that Amazon SQS returns in the response. If you do not include the parameter, the overall visibility timeout for the queue is used for the returned messages. For more information, see Visibility Timeout in the Amazon SQS Developer Guide.

NOTE

Going forward, new attributes might be added. If you are writing code that calls this action, we recommend that you structure your code so that it can handle new attributes gracefully.

http://docs.aws.amazon.com/AWSSimpleQueueService/2012-11-05/APIReference/API_ReceiveMessage.html

Constructors

ReceiveMessage |

Fields

- rmVisibilityTimeout :: !(Maybe Int)

  The duration (in seconds) that the received messages are hidden from subsequent retrieve requests after being retrieved by a ReceiveMessage request.

- rmAttributes :: ![MessageAttribute]

  A list of attributes that need to be returned along with each message.

  The following lists the names and descriptions of the attributes that can be returned:

  - All - returns all values.
  - ApproximateFirstReceiveTimestamp - returns the time when the message was first received (epoch time in milliseconds).
  - ApproximateReceiveCount - returns the number of times a message has been received but not deleted.
  - SenderId - returns the AWS account number (or the IP address, if anonymous access is allowed) of the sender.
  - SentTimestamp - returns the time when the message was sent (epoch time in milliseconds).
- rmMaxNumberOfMessages :: !(Maybe Int)

  The maximum number of messages to return. Amazon SQS never returns more messages than this value but may return fewer. Values can be from 1 to 10. Default is 1.

  All of the messages are not necessarily returned.

- rmUserMessageAttributes :: ![UserMessageAttributeName]

  The name of the message attribute, where N is the index. The message attribute name can contain the following characters: A-Z, a-z, 0-9, underscore (_), hyphen (-), and period (.). The name must not start or end with a period, and it should not have successive periods. The name is case sensitive and must be unique among all attribute names for the message. The name can be up to 256 characters long. The name cannot start with "AWS." or "Amazon." (or any variations in casing), because these prefixes are reserved for use by Amazon Web Services.

  When using ReceiveMessage, you can send a list of attribute names to receive, or you can return all of the attributes by specifying All or ".*" in your request. You can also use "foo.*" to return all message attributes starting with the "foo" prefix.

- rmQueueName :: !QueueName

  The URL of the Amazon SQS queue to take action on.

- rmWaitTimeSeconds :: !(Maybe Int)

  The duration (in seconds) for which the call will wait for a message to arrive in the queue before returning. If a message is available, the call will return sooner than WaitTimeSeconds.

#### Instances

Instances details

SignQuery ReceiveMessage Source # |

Instance details

Defined in Aws.Sqs.Commands.Message

Associated Types

type ServiceConfiguration ReceiveMessage |
Instance details Defined in Aws.Sqs.Commands.Message type ServiceConfiguration ReceiveMessage = SqsConfiguration

Methods

signQuery :: ReceiveMessage -> ServiceConfiguration ReceiveMessage queryType -> SignatureData -> SignedQuery Source #

Read ReceiveMessage Source # |
Instance details Defined in Aws.Sqs.Commands.Message Methods readsPrec :: Int -> ReadS ReceiveMessage Source # readList :: ReadS [ReceiveMessage] Source # readPrec :: ReadPrec ReceiveMessage Source # readListPrec :: ReadPrec [ReceiveMessage] Source #
Show ReceiveMessage Source # |
Instance details Defined in Aws.Sqs.Commands.Message Methods showsPrec :: Int -> ReceiveMessage -> ShowS Source # show :: ReceiveMessage -> String Source # showList :: [ReceiveMessage] -> ShowS Source #
Eq ReceiveMessage Source # |
Instance details Defined in Aws.Sqs.Commands.Message Methods (==) :: ReceiveMessage -> ReceiveMessage -> Bool Source # (/=) :: ReceiveMessage -> ReceiveMessage -> Bool Source #
Ord ReceiveMessage Source # |

Instance details

Defined in Aws.Sqs.Commands.Message

Methods

compare :: ReceiveMessage -> ReceiveMessage -> Ordering Source #

(<) :: ReceiveMessage -> ReceiveMessage -> Bool Source #

(<=) :: ReceiveMessage -> ReceiveMessage -> Bool Source #

(>) :: ReceiveMessage -> ReceiveMessage -> Bool Source #

(>=) :: ReceiveMessage -> ReceiveMessage -> Bool Source #

max :: ReceiveMessage -> ReceiveMessage -> ReceiveMessage Source #

min :: ReceiveMessage -> ReceiveMessage -> ReceiveMessage Source #

Transaction ReceiveMessage ReceiveMessageResponse Source # |
Instance details Defined in Aws.Sqs.Commands.Message
type ServiceConfiguration ReceiveMessage Source # |
Instance details Defined in Aws.Sqs.Commands.Message type ServiceConfiguration ReceiveMessage = SqsConfiguration

data ReceiveMessageResponse Source #

Constructors

ReceiveMessageResponse |

Fields

- rmrMessages :: ![Message]

#### Instances

Instances details

AsMemoryResponse ReceiveMessageResponse Source # |

Instance details

Defined in Aws.Sqs.Commands.Message

Associated Types

type MemoryResponse ReceiveMessageResponse |
Instance details Defined in Aws.Sqs.Commands.Message type MemoryResponse ReceiveMessageResponse = ReceiveMessageResponse

Methods

loadToMemory :: ReceiveMessageResponse -> ResourceT IO (MemoryResponse ReceiveMessageResponse) Source #

Read ReceiveMessageResponse Source # |
Instance details Defined in Aws.Sqs.Commands.Message Methods readsPrec :: Int -> ReadS ReceiveMessageResponse Source # readList :: ReadS [ReceiveMessageResponse] Source # readPrec :: ReadPrec ReceiveMessageResponse Source # readListPrec :: ReadPrec [ReceiveMessageResponse] Source #
Show ReceiveMessageResponse Source # |
Instance details Defined in Aws.Sqs.Commands.Message Methods showsPrec :: Int -> ReceiveMessageResponse -> ShowS Source # show :: ReceiveMessageResponse -> String Source # showList :: [ReceiveMessageResponse] -> ShowS Source #
Eq ReceiveMessageResponse Source # |
Instance details Defined in Aws.Sqs.Commands.Message Methods (==) :: ReceiveMessageResponse -> ReceiveMessageResponse -> Bool Source # (/=) :: ReceiveMessageResponse -> ReceiveMessageResponse -> Bool Source #
Ord ReceiveMessageResponse Source # |

Instance details

Defined in Aws.Sqs.Commands.Message

Methods

compare :: ReceiveMessageResponse -> ReceiveMessageResponse -> Ordering Source #

(<) :: ReceiveMessageResponse -> ReceiveMessageResponse -> Bool Source #

(<=) :: ReceiveMessageResponse -> ReceiveMessageResponse -> Bool Source #

(>) :: ReceiveMessageResponse -> ReceiveMessageResponse -> Bool Source #

(>=) :: ReceiveMessageResponse -> ReceiveMessageResponse -> Bool Source #

max :: ReceiveMessageResponse -> ReceiveMessageResponse -> ReceiveMessageResponse Source #

min :: ReceiveMessageResponse -> ReceiveMessageResponse -> ReceiveMessageResponse Source #

ResponseConsumer r ReceiveMessageResponse Source # |

Instance details

Defined in Aws.Sqs.Commands.Message

Associated Types

type ResponseMetadata ReceiveMessageResponse |
Instance details Defined in Aws.Sqs.Commands.Message type ResponseMetadata ReceiveMessageResponse = SqsMetadata

Methods

responseConsumer :: Request -> r -> IORef (ResponseMetadata ReceiveMessageResponse) -> HTTPResponseConsumer ReceiveMessageResponse Source #

Transaction ReceiveMessage ReceiveMessageResponse Source # |
Instance details Defined in Aws.Sqs.Commands.Message
type MemoryResponse ReceiveMessageResponse Source # |
Instance details Defined in Aws.Sqs.Commands.Message type MemoryResponse ReceiveMessageResponse = ReceiveMessageResponse
type ResponseMetadata ReceiveMessageResponse Source # |
Instance details Defined in Aws.Sqs.Commands.Message type ResponseMetadata ReceiveMessageResponse = SqsMetadata

# Change Message Visiblity

data ChangeMessageVisibility Source #

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.

NOTE

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.

IMPORTANT

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.

IMPORTANT

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.

http://docs.aws.amazon.com/AWSSimpleQueueService/2012-11-05/APIReference/API_ChangeMessageVisibility.html

Constructors

ChangeMessageVisibility |

Fields

- cmvReceiptHandle :: !ReceiptHandle

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

- cmvVisibilityTimeout :: !Int

  The new value (in seconds - from 0 to 43200 - maximum 12 hours) for the message's visibility timeout.

- cmvQueueName :: !QueueName

  The URL of the Amazon SQS queue to take action on.

#### Instances

Instances details

SignQuery ChangeMessageVisibility Source # | ServiceConfiguration: `SqsConfiguration`

Instance details

Defined in Aws.Sqs.Commands.Message

Associated Types

type ServiceConfiguration ChangeMessageVisibility |
Instance details Defined in Aws.Sqs.Commands.Message type ServiceConfiguration ChangeMessageVisibility = SqsConfiguration

Methods

signQuery :: ChangeMessageVisibility -> ServiceConfiguration ChangeMessageVisibility queryType -> SignatureData -> SignedQuery Source #

Read ChangeMessageVisibility Source # |
Instance details Defined in Aws.Sqs.Commands.Message Methods readsPrec :: Int -> ReadS ChangeMessageVisibility Source # readList :: ReadS [ChangeMessageVisibility] Source # readPrec :: ReadPrec ChangeMessageVisibility Source # readListPrec :: ReadPrec [ChangeMessageVisibility] Source #
Show ChangeMessageVisibility Source # |
Instance details Defined in Aws.Sqs.Commands.Message Methods showsPrec :: Int -> ChangeMessageVisibility -> ShowS Source # show :: ChangeMessageVisibility -> String Source # showList :: [ChangeMessageVisibility] -> ShowS Source #
Eq ChangeMessageVisibility Source # |
Instance details Defined in Aws.Sqs.Commands.Message Methods (==) :: ChangeMessageVisibility -> ChangeMessageVisibility -> Bool Source # (/=) :: ChangeMessageVisibility -> ChangeMessageVisibility -> Bool Source #
Ord ChangeMessageVisibility Source # |

Instance details

Defined in Aws.Sqs.Commands.Message

Methods

compare :: ChangeMessageVisibility -> ChangeMessageVisibility -> Ordering Source #

(<) :: ChangeMessageVisibility -> ChangeMessageVisibility -> Bool Source #

(<=) :: ChangeMessageVisibility -> ChangeMessageVisibility -> Bool Source #

(>) :: ChangeMessageVisibility -> ChangeMessageVisibility -> Bool Source #

(>=) :: ChangeMessageVisibility -> ChangeMessageVisibility -> Bool Source #

max :: ChangeMessageVisibility -> ChangeMessageVisibility -> ChangeMessageVisibility Source #

min :: ChangeMessageVisibility -> ChangeMessageVisibility -> ChangeMessageVisibility Source #

Transaction ChangeMessageVisibility ChangeMessageVisibilityResponse Source # |
Instance details Defined in Aws.Sqs.Commands.Message
type ServiceConfiguration ChangeMessageVisibility Source # |
Instance details Defined in Aws.Sqs.Commands.Message type ServiceConfiguration ChangeMessageVisibility = SqsConfiguration

data ChangeMessageVisibilityResponse Source #

Constructors

ChangeMessageVisibilityResponse |

#### Instances

Instances details

AsMemoryResponse ChangeMessageVisibilityResponse Source # |

Instance details

Defined in Aws.Sqs.Commands.Message

Associated Types

type MemoryResponse ChangeMessageVisibilityResponse |
Instance details Defined in Aws.Sqs.Commands.Message type MemoryResponse ChangeMessageVisibilityResponse = ChangeMessageVisibilityResponse

Methods

loadToMemory :: ChangeMessageVisibilityResponse -> ResourceT IO (MemoryResponse ChangeMessageVisibilityResponse) Source #

Read ChangeMessageVisibilityResponse Source # |
Instance details Defined in Aws.Sqs.Commands.Message Methods readsPrec :: Int -> ReadS ChangeMessageVisibilityResponse Source # readList :: ReadS [ChangeMessageVisibilityResponse] Source # readPrec :: ReadPrec ChangeMessageVisibilityResponse Source # readListPrec :: ReadPrec [ChangeMessageVisibilityResponse] Source #
Show ChangeMessageVisibilityResponse Source # |
Instance details Defined in Aws.Sqs.Commands.Message Methods showsPrec :: Int -> ChangeMessageVisibilityResponse -> ShowS Source # show :: ChangeMessageVisibilityResponse -> String Source # showList :: [ChangeMessageVisibilityResponse] -> ShowS Source #
Eq ChangeMessageVisibilityResponse Source # |
Instance details Defined in Aws.Sqs.Commands.Message Methods (==) :: ChangeMessageVisibilityResponse -> ChangeMessageVisibilityResponse -> Bool Source # (/=) :: ChangeMessageVisibilityResponse -> ChangeMessageVisibilityResponse -> Bool Source #
Ord ChangeMessageVisibilityResponse Source # |

Instance details

Defined in Aws.Sqs.Commands.Message

Methods

compare :: ChangeMessageVisibilityResponse -> ChangeMessageVisibilityResponse -> Ordering Source #

(<) :: ChangeMessageVisibilityResponse -> ChangeMessageVisibilityResponse -> Bool Source #

(<=) :: ChangeMessageVisibilityResponse -> ChangeMessageVisibilityResponse -> Bool Source #

(>) :: ChangeMessageVisibilityResponse -> ChangeMessageVisibilityResponse -> Bool Source #

(>=) :: ChangeMessageVisibilityResponse -> ChangeMessageVisibilityResponse -> Bool Source #

max :: ChangeMessageVisibilityResponse -> ChangeMessageVisibilityResponse -> ChangeMessageVisibilityResponse Source #

min :: ChangeMessageVisibilityResponse -> ChangeMessageVisibilityResponse -> ChangeMessageVisibilityResponse Source #

ResponseConsumer r ChangeMessageVisibilityResponse Source # |

Instance details

Defined in Aws.Sqs.Commands.Message

Associated Types

type ResponseMetadata ChangeMessageVisibilityResponse |
Instance details Defined in Aws.Sqs.Commands.Message type ResponseMetadata ChangeMessageVisibilityResponse = SqsMetadata

Methods

responseConsumer :: Request -> r -> IORef (ResponseMetadata ChangeMessageVisibilityResponse) -> HTTPResponseConsumer ChangeMessageVisibilityResponse Source #

Transaction ChangeMessageVisibility ChangeMessageVisibilityResponse Source # |
Instance details Defined in Aws.Sqs.Commands.Message
type MemoryResponse ChangeMessageVisibilityResponse Source # |
Instance details Defined in Aws.Sqs.Commands.Message type MemoryResponse ChangeMessageVisibilityResponse = ChangeMessageVisibilityResponse
type ResponseMetadata ChangeMessageVisibilityResponse Source # |
Instance details Defined in Aws.Sqs.Commands.Message type ResponseMetadata ChangeMessageVisibilityResponse = SqsMetadata