Method: RightAws::SqsInterface#create_queue

Defined in:
lib/sqs/right_sqs_interface.rb

#create_queue(queue_name, default_visibility_timeout = nil) ⇒ Object

Creates new queue. Returns new queue link.

sqs.create_queue('my_awesome_queue') #=> 'http://queue.amazonaws.com/ZZ7XXXYYYBINS/my_awesome_queue'

PS Some queue based requests may not become available until a couple of minutes after queue creation (permission grant and removal for example)



142
143
144
145
146
147
# File 'lib/sqs/right_sqs_interface.rb', line 142

def create_queue(queue_name, default_visibility_timeout=nil)
  req_hash = generate_request('CreateQueue', 
                              'QueueName'                => queue_name,
                              'DefaultVisibilityTimeout' => default_visibility_timeout || DEFAULT_VISIBILITY_TIMEOUT )
  request_info(req_hash, SqsCreateQueueParser.new(:logger => @logger))
end