Skip to content

Commit

Permalink
fix: make default MaxWaitTime 500ms
Browse files Browse the repository at this point in the history
Both the official Java client and librdkafka default to using a default
of 500ms for the fetch.max.wait.ms to avoid excessive network usage for
low throughput topics. Updating Sarama to do the same.
  • Loading branch information
dnwe committed May 11, 2022
1 parent 0fe5d53 commit 095b45a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion config.go
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ func NewConfig() *Config {
c.Consumer.Fetch.Min = 1
c.Consumer.Fetch.Default = 1024 * 1024
c.Consumer.Retry.Backoff = 2 * time.Second
c.Consumer.MaxWaitTime = 250 * time.Millisecond
c.Consumer.MaxWaitTime = 500 * time.Millisecond
c.Consumer.MaxProcessingTime = 100 * time.Millisecond
c.Consumer.Return.Errors = false
c.Consumer.Offsets.AutoCommit.Enable = true
Expand Down

0 comments on commit 095b45a

Please sign in to comment.