Skip to content
This repository has been archived by the owner on Sep 4, 2024. It is now read-only.

Commit

Permalink
Merge pull request #6 from Cox-Automotive/feature/US956382_backoff_re…
Browse files Browse the repository at this point in the history
…try_for_kafka

Increased retry wait time from power of 2 to 2.5
  • Loading branch information
Manases-Leal committed Jan 12, 2023
2 parents 7631901 + 7ce0e4f commit 6ea4585
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/topic.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ func createTopic(c Client, t *NewTopic) (*Topic, error) {
if err != nil {
fmt.Printf("%s\n\n",err)
fmt.Println("Waiting to retry...")
time.Sleep(time.Duration(math.Pow(float64(retry), 2)) * time.Second)
time.Sleep(time.Duration(math.Pow(float64(retry), 2.5)) * time.Second)
fmt.Printf("Starting retry attempt %d of %d\n", retry, retryCap)
res, err := c.doRequest(req)
_,_ = res, err
Expand Down

0 comments on commit 6ea4585

Please sign in to comment.