
receive-message
***************


DESCRIPTION
===========

Retrieves one or more messages from the specified queue, including the
message body and message ID of each message. Messages returned by this
action stay in the queue until you delete them. However, once a
message is returned to a "receive-message" request, it is not returned
on subsequent "receive-message" requests for the duration of the
"--visibility-timeout" . If you do not specify a "--visibility-
timeout" in the request, the overall visibility timeout for the queue
is used for the returned messages.

If a message is available in the queue, the call will return
immediately. Otherwise, it will wait up to "--wait-time-seconds" for a
message to arrive. If you do not specify "--wait-time-seconds" in the
request, the queue attribute ReceiveMessageWaitTimeSeconds is used to
determine how long to wait.

You could ask for additional information about each message through
the attributes. Attributes that can be requested are "[SenderId,
ApproximateFirstReceiveTimestamp, ApproximateReceiveCount,
SentTimestamp]" .


SYNOPSIS
========

   aws sqs receive-message
     --queue-url <value>
     [--wait-time-seconds <value>]
     [--visibility-timeout <value>]
     [--max-number-of-messages <value>]
     [--attribute-names <value>]


REQUIRED PARAMETERS
===================

"--queue-url"  (string)
   The URL of the SQS queue to take action on.


OPTIONAL PARAMETERS
===================

"--wait-time-seconds"  (integer)
   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.

"--visibility-timeout"  (integer)
   The duration (in seconds) that the received messages are hidden
   from subsequent retrieve requests after being retrieved by a
   "receive-message" request.

"--max-number-of-messages"  (integer)
   The maximum number of messages to return. Amazon SQS never returns
   more messages than this value but may return fewer.

   All of the messages are not necessarily returned.

"--attribute-names"  (list of string)
   A list of attributes that need to be returned along with each
   message. The set of valid attributes are [SenderId,
   ApproximateFirstReceiveTimestamp, ApproximateReceiveCount,
   SentTimestamp].

   *Parameter Syntax*

      ["Policy"|"VisibilityTimeout"|"MaximumMessageSize"|"MessageRetentionPeriod"|
      "ApproximateNumberOfMessages"|"ApproximateNumberOfMessagesNotVisible"|"Creat
      edTimestamp"|"LastModifiedTimestamp"|"QueueArn"|"ApproximateNumberOfMessages
      Delayed"|"DelaySeconds"|"ReceiveMessageWaitTimeSeconds", ...]
