ExAws.SQS.receive_message
receive_message
, go back to ExAws.SQS module for more information.
Specs
receive_message(queue_url :: binary(), opts :: receive_message_opts()) :: ExAws.Operation.Query.t()
Read messages from a SQS Queue
Options
:attribute_names
-:all
or a list ofAttributeNames
to include in the response. Valid attributes are: [:sender_id, :sent_timestamp, :approximate_receive_count, :approximate_first_receive_timestamp, :sequence_number, :message_deduplication_id, :message_group_id, :aws_trace_header]:message_attribute_names
- List of message attributes to include.- The name can contain alphanumeric characters and the underscore (_), hyphen (-), and period (.).
- The name is case-sensitive and must be unique among all attribute names for the message.
- The name must not start with AWS-reserved prefixes such as AWS. or Amazon. (or any casing variants).
- The name must not start or end with a period (.), and it should not have periods in succession (..).
- The name can be up to 256 characters long. 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 all message attributes starting with a prefix, for example bar..
:max_number_of_messages
- The maximum number of messages to return. Amazon SQS never returns more messages than this value (however, fewer messages might be returned). Valid values: 1 to 10. Default: 1.:visibility_timeout
- The duration (in seconds) that the received messages are hidden from subsequent retrieve requests after being retrieved by a ReceiveMessage request.:wait_time_seconds
- The duration (in seconds) for which the call waits for a message to arrive in the queue before returning. If a message is available, the call returns sooner than WaitTimeSeconds. If no messages are available and the wait time expires, the call returns successfully with an empty list of messages.:receive_request_attempt_id
- This parameter applies only to FIFO (first-in-first-out) queues.The token used for deduplication of ReceiveMessage calls. If a networking issue occurs after a ReceiveMessage action, and instead of a response you receive a generic error, it is possible to retry the same action with an identical ReceiveRequestAttemptId to retrieve the same set of messages, even if their visibility timeout has not yet expired.