add long polling support #7

Merged
merged 2 commits into from Jun 26, 2014

Projects

None yet

5 participants

@pyeremenko
Iron.io member

I didn't prioritize implementing async versions of Get/Next with wait parameter because customer may not need it...

@rkononov rkononov was assigned by pyeremenko Jun 25, 2014
@Stephenitis

looks pretty good can you add an example of the GET call with the wait parameter in the Readme?

@treeder
Iron.io member

Let's get this merged. Do we need to push it to any package manager or anything?

@carimura
Iron.io member

@treeder I think NUGET, yes.

But please put an example in the README so it has a long polling option in there. @Stephenitis can you do this?

@Stephenitis

happy to.

am I correct @pyeremenko to say you use it by calling the following
QueueMessage msg = queue.Get(30, 60, 100);
// Get a message
// n = 30
// timeout = 60
// wait = 100

or can arguments be optional/missing?
QueueMessage msg = queue.Get(, , 100);
// Get a message
// n = 30
// timeout = 60
// wait = 100

or can I name my arguments and use the defaults?
QueueMessage msg = queue.Get(wait: 100);
// Get a message
// n = 30
// timeout = 60
// wait = 100

@Stephenitis

I'm so confused by

// Get a message
QueueMessage msg = queue.Next();

can I replace that in docs with queue.Get() instead? terminology fuzzles me

@Stephenitis

I removed .Next() from the docs since it was not parity with our api terminology and does not appear to provide a proper interface for the parameters that should be added for the function.

this function pattern looks bananas to me, if there is a reason for Next to call Next I'd love to know.
https://github.com/iron-io/iron_dotnet/blob/f75d81b5fdac9cbec857f13a50b23a1eced7203f/src/IronSharp.IronMQ/QueueClient.cs#L315-L336

selfie-1

@Stephenitis Stephenitis merged commit e8ffbfc into master Jun 26, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment