Skip to content

Commit

Permalink
config: lower default MetadataMinAge to 2.5s
Browse files Browse the repository at this point in the history
5s feels long; this can be bumped back up if needed.
  • Loading branch information
twmb committed Mar 1, 2022
1 parent e7bd28f commit 7f58a97
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/kgo/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ func defaultCfg() cfg {
maxBrokerReadBytes: 100 << 20,

metadataMaxAge: 5 * time.Minute,
metadataMinAge: 5 * time.Second,
metadataMinAge: 5 * time.Second / 2,

//////////////
// producer //
Expand Down Expand Up @@ -760,7 +760,7 @@ func MetadataMaxAge(age time.Duration) Opt {
}

// MetadataMinAge sets the minimum time between metadata queries, overriding
// the default 5s. You may want to raise or lower this to reduce the number of
// the default 2.5s. You may want to raise or lower this to reduce the number of
// metadata queries the client will make. Notably, if metadata detects an error
// in any topic or partition, it triggers itself to update as soon as allowed.
// Additionally, any connection failures causing backoff while producing or
Expand Down

0 comments on commit 7f58a97

Please sign in to comment.