| Class | RightAws::Sqs |
| In: |
lib/sqs/right_sqs.rb
|
| Parent: | Object |
The RightAws::Sqs class provides a complete interface to Amazon‘s Simple Queue Service. For explanations of the semantics of each call, please refer to Amazon‘s documentation at developer.amazonwebservices.com/connect/kbcategory.jspa?categoryID=31
Error handling: all operations raise an RightAws::AwsError in case of problems. Note that transient errors are automatically retried.
sqs = RightAws::Sqs.new(aws_access_key_id, aws_secret_access_key)
queue1 = sqs.queue('my_awesome_queue')
...
queue2 = RightAws::Sqs::Queue.create(sqs, 'my_cool_queue', true)
puts queue2.size
...
message1 = queue2.receive
message1.visibility = 0
puts message1
...
queue2.clear(true)
queue2.send_message('Ola-la!')
message2 = queue2.pop
...
grantee1 = RightAws::Sqs::Grantee.create(queue2,'one_cool_guy@email.address')
grantee1.grant('FULLCONTROL')
grantee1.drop
...
grantee2 = queue.grantees('another_cool_guy@email.address')
grantee2.revoke('SENDMESSAGE')
| interface | [R] |