Method: RightAws::SqsInterface#get_queue_attributes

Defined in:
lib/sqs/right_sqs_interface.rb

#get_queue_attributes(queue_url, attribute = 'All') ⇒ Object

Retrieves the queue attribute(s). Returns a hash of attribute(s) or an exception.

sqs.get_queue_attributes('http://queue.amazonaws.com/ZZ7XXXYYYBINS/my_awesome_queue') #=> {"ApproximateNumberOfMessages"=>"0", "VisibilityTimeout"=>"30"}


179
180
181
182
183
184
185
186
# File 'lib/sqs/right_sqs_interface.rb', line 179

def get_queue_attributes(queue_url, attribute='All')
  req_hash = generate_request('GetQueueAttributes', 
                              'Attribute' => attribute,
                              :queue_url  => queue_url)
  request_info(req_hash, SqsGetQueueAttributesParser.new(:logger => @logger))
rescue
  on_exception
end