Method: Fog::AWS::SQS::Real#receive_message
- Defined in:
- lib/fog/aws/requests/sqs/receive_message.rb
permalink #receive_message(queue_url, options = {}) ⇒ Object
Get a message from a queue (marks it as unavailable temporarily, but does not remove from queue, see delete_message)
Parameters
-
queue_url<~String> - Url of queue to get message from
-
options<~Hash>:
-
Attributes<~Array> - List of attributes to return, in [‘All’, ‘ApproximateFirstReceiveTimestamp’, ‘ApproximateReceiveCount’, ‘SenderId’, ‘SentTimestamp’], defaults to ‘All’
-
MaxNumberOfMessages<~Integer> - Maximum number of messages to return, defaults to 1
-
VisibilityTimeout<~Integer> - Duration, in seconds, to hide message from other receives. In 0..43200, defaults to visibility timeout for queue
-
See Also
docs.amazonwebservices.com/AWSSimpleQueueService/latest/APIReference/Query_QueryReceiveMessage.html
21 22 23 24 25 26 27 28 |
# File 'lib/fog/aws/requests/sqs/receive_message.rb', line 21 def (queue_url, = {}) request({ 'Action' => 'ReceiveMessage', 'AttributeName' => 'All', :path => path_from_queue_url(queue_url), :parser => Fog::Parsers::AWS::SQS::ReceiveMessage.new }.merge!()) end |