Method: Aws::SqsInterface#set_queue_attributes
- Defined in:
- lib/sqs/sqs_interface.rb
#set_queue_attributes(queue_url, attribute, value) ⇒ Object
Sets queue attribute. Returns true or an exception.
sqs.set_queue_attributes('http://queue.amazonaws.com/ZZ7XXXYYYBINS/my_awesome_queue', "VisibilityTimeout", 10) #=> true
From the SQS Dev Guide: “Currently, you can set only the VisibilityTimeout attribute for a queue… When you change a queue’s attributes, the change can take up to 60 seconds to propagate throughout the SQS system.”
NB: Attribute values may not be immediately available to other queries for some time after an update. See the SQS documentation for semantics, but in general propagation can take up to 60 s.
228 229 230 231 232 233 |
# File 'lib/sqs/sqs_interface.rb', line 228 def set_queue_attributes(queue_url, attribute, value) req_hash = generate_request('SetQueueAttributes', 'Attribute.Name' => attribute, 'Attribute.Value' => value, :queue_url => queue_url) request_info(req_hash, SqsStatusParser.new(:logger => @logger)) rescue on_exception end |