Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a CreateQueueWithParams function #74

Merged
merged 4 commits into from
Jan 21, 2014

Conversation

joeshaw
Copy link
Contributor

@joeshaw joeshaw commented Jan 20, 2014

This allows you to pass along arbitrary attributes when creating a queue, for example WaitTimeSeconds for long polling. It takes a map[string]string, and CreateQueueWithTimeout is changed to be implemented in terms of it.

This PR also includes a few changes to the test suite, most notably that the tests are moved into the same package as the code. This is idiomatic, and makes it possible to run the tests while you are developing the code. It also moves the test server to a different port to avoid conflicting with services that run as part of OS X Server.

Port 4444 conflicts with another service run by Mac OS X Server on
Mavericks.
This makes it possible to run the tests as you develop, especially
if you are developing against a github fork.
This allows you to set arbitrary attributes when creating a queue,
like setting WaitTimeSeconds to allow for long-polling.

Reimplement CreateQueueWithTimeout in terms of CreateQueueWithParams
and add unit tests for both functions.
@joeshaw
Copy link
Contributor Author

joeshaw commented Jan 20, 2014

Hold off on this PR for now... Turns out that DefaultVisibilityTimeout wasn't implemented properly before. I'll add some commits to fix it up.

@moorage
Copy link
Contributor

moorage commented Jan 20, 2014

Understood! Thanks for your work on this :)

According to the SQS docs, the visibility timeout needs to be provided as
an attribute, and with the name "VisibilityTimeout".
@joeshaw
Copy link
Contributor Author

joeshaw commented Jan 20, 2014

Ok, pushed a commit which fixes the behavior and renames the function to CreateQueueWithAttributes, since that's more correct AWS terminology.

moorage pushed a commit that referenced this pull request Jan 21, 2014
Add a CreateQueueWithParams function
@moorage moorage merged commit 4295239 into AdRoll:master Jan 21, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants