-
Notifications
You must be signed in to change notification settings - Fork 6
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 support for cascading retries #35
base: master
Are you sure you want to change the base?
Conversation
select { | ||
case <-timer.C: | ||
break | ||
case <-session.Context().Done(): |
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.
Is the context terminated when a rebalance happens?
events/config.go
Outdated
@@ -19,6 +21,9 @@ type CloudEventsConfig struct { | |||
KafkaVersion string `envconfig:"KAFKA_VERSION" required:"true"` | |||
KafkaUsername string `envconfig:"KAFKA_USERNAME" required:"false"` | |||
KafkaPassword string `envconfig:"KAFKA_PASSWORD" required:"false"` | |||
KafkaDelay int `envconfig:"KAFKA_DELAY" default:"0"` | |||
CascadeDelays []int `envconfig:"KAFKA_CASCADE_DELAYS" default:""` |
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.
I think envocnfig supports parsing time.Duration
out of the box, so it should be possible to use it directly, instead of int
.
Should we provide sensible defaults?
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.
Looks good - just make sure rebalancing is handled correctly
I added support for exponential backoff retries. |
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.
Code looks good to me. Can you please test this before merging?
Of course thx.
Derrick
…On Nov 6, 2020, 7:05 PM -0800, Todd Kazakov ***@***.***>, wrote:
@toddkazakov approved this pull request.
Code looks good to me. Can you please test this before merging?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
@todd I have not tested this yet. I just want to get your eyes on it to see if you a better approach.