-
Notifications
You must be signed in to change notification settings - Fork 64
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
Refactoring Retry Logic for Exponential Retries #138
Refactoring Retry Logic for Exponential Retries #138
Conversation
mjayprateek
commented
Jan 3, 2020
•
edited
edited
- Introduces retry types [:linear, :exponential]
- Removed the usage of retry-limits in case of exponential retries
- Introduces queue-timeout-ms for channels
:linear for enabling linear retries :exponential for enabling exponential backoff based retries
…ic retry-count and queue-timeout-ms values Earlier, if these values were not present in the a channel config, the channel retry flow would pick retry-count and queue-timeout-ms from Ziggurat config.
38af3bf
to
bef4261
Compare
Tests for make-queues Tests for get-backoff-exponent
(let [{:keys [queue-name exchange-name dead-letter-exchange]} (:delay (rabbitmq-config)) | ||
queue-name (delay-queue-name topic-entity queue-name) | ||
exchange-name (prefixed-queue-name topic-entity exchange-name) | ||
dead-letter-exchange-name (prefixed-queue-name topic-entity dead-letter-exchange) | ||
sequence (if (<= retry-count exponential-backoff-count) (inc retry-count) (inc exponential-backoff-count))] |
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.
exponential-backoff-count also used to control if we want to have exponential retry initially but after some retry it will be linear retry. how we can achieve it now?
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.
we're not supporting that anymore, I cannot think of a usecase where we'll need both linear and exponential retry in the same flow.
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.
IMO, it unnecessarily complicates things.