Skip to content

Commit

Permalink
Merge pull request #3 from tikivn/config/kafka_time_out
Browse files Browse the repository at this point in the history
[Config] Tăng số lần retry của producer lên 10
  • Loading branch information
datdao authored Nov 25, 2019
2 parents d600b8a + 305f78e commit f16c1b9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sarama.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ func NewConfig() *sarama.Config {
cfg.Producer.Flush.MaxMessages = 1
cfg.Producer.Return.Successes = true

cfg.Producer.Retry.Max = 10
cfg.Producer.Retry.Backoff = time.Second

return cfg
}

Expand Down

0 comments on commit f16c1b9

Please sign in to comment.