-
Notifications
You must be signed in to change notification settings - Fork 331
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
Exp backoff #278
base: master
Are you sure you want to change the base?
Exp backoff #278
Conversation
…tter-exchange from max retry handler to make it interchangeable.
@gabrieljoelc thoughts on this? It can be useful but exponential backoff also can be confusing to both humans and monitoring systems. Should we provide such implementation given that it can be provided in the user code? |
I've contemplated the same thing for a while. I need to spend some time reviewing and see if it's extendible/configurable enough to match up with my existing use case. 😛 |
@gabrieljoelc did you get a chance to investigate this? :) We recently introduced a similar (pluggable) feature in the RabbitMQ Java client, so unless the exponential back-off behavior is forced on everyone, I'm a lot more open to it now. It's still damn hard to reason about it when you watch it in action, though :/ |
@michaelklishin I didn't get a chance yet and I'll be hard-pressed to find the time right now. @dwkoogt this may be a bit much to ask, but would you be open to comparing this other backoff handler to discuss commonalities? |
@gabrieljoelc hi. The other backoff handler uses a different approach and setup. It uses per message expiration where expiration time is a constant * (2** num_failures). I've looked into using that but didn't because the rabbitmq doc says "When setting per-message TTL expired messages can queue up behind non-expired ones until the latter are consumed or expired." (https://www.rabbitmq.com/ttl.html). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does look good. Can you add some documentation with some examples of resulting queue structures/names please?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for contributing and for doing the additional research for me!
@michaelklishin I'm good with this. What do you think?
Might be worth looking at the sneakers_handlers as well |
Tried creating an exponential backoff retry handler that can be configured same way as the Maxretry handler. I have wrote about it in this blog post.