#8 new
Jim Blomo

SQS create_queue returns error

Reported by Jim Blomo | May 28th, 2013 @ 08:44 AM

In version 2.9.1, in file sqs/sqs.rb function queue, there's an incorrect assumption about what happens when creating a queue that already exists.

if create
        url = @interface.create_queue(queue_name, visibility) # this returns the url even if it exists

This may have been true when SQS launched, but SQS now returns a QueueAlreadyExists error when an attempting to create a queue that already exists with different attributes (eg. a different VisibilityTimeout). http://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReferenc...

I believe checking for an existing queue before attempting to create it better reflects the docstring: "If the queue does not exist at Amazon SQS and +create+ is true, the method creates it."

Attached is a patch to accomplish this.

No comments found



New-ticket Create new ticket

Create your profile



Code hosted at http://github.com/appoxy/aws

Shared Ticket Bins

People watching this ticket