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

Delayed Abandon #59

Closed
lukeschafer opened this issue Mar 10, 2014 · 1 comment
Closed

Delayed Abandon #59

lukeschafer opened this issue Mar 10, 2014 · 1 comment

Comments

@lukeschafer
Copy link
Contributor

Delayed abandons would be useful for retry backoffs. E.g. instead of

await message.AbandonAsync(exception.ExceptionDetailsAsProperties(_clock.UtcNow));

you can

If (_settings.DelayedAbandon.HasValue) Thread.Sleep(_settings.DelayedAbandon.GetValueOrDefault());
await message.AbandonAsync(exception.ExceptionDetailsAsProperties(_clock.UtcNow));

It's safe (durable) to wait in-proc like this as a) it's already on its own thread, and b) if the process dies the peeklock will simply expire and the message will become available again

Optional:

Exponential backoffs - when abandoning a message, use DeliveryCount, or add the last-waited/abandon count to the message properties and read this when backing off.

Happy to implement everything above if you agree.

@lukeschafer
Copy link
Contributor Author

clearly the max wait time is the peeklock time :)

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

No branches or pull requests

2 participants