From 095b45ab2157e80e41799e606b09c6c4dab3f5b6 Mon Sep 17 00:00:00 2001 From: Dominic Evans Date: Wed, 11 May 2022 18:24:07 +0100 Subject: [PATCH] fix: make default MaxWaitTime 500ms 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. --- config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.go b/config.go index ef8bf8df6..4cb99232a 100644 --- a/config.go +++ b/config.go @@ -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