Skip to content

Commit

Permalink
Fix max open requests to one if idempotent writes is set to true (inf…
Browse files Browse the repository at this point in the history
  • Loading branch information
helenosheaa authored Mar 8, 2021
1 parent d7df2c5 commit 372004a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions plugins/common/kafka/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ func (k *WriteConfig) SetConfig(config *sarama.Config) error {
config.Producer.MaxMessageBytes = k.MaxMessageBytes
}
config.Producer.RequiredAcks = sarama.RequiredAcks(k.RequiredAcks)
if config.Producer.Idempotent {
config.Net.MaxOpenRequests = 1
}
return k.Config.SetConfig(config)
}

Expand Down

0 comments on commit 372004a

Please sign in to comment.