Skip to content

Commit

Permalink
fix: message.max.bytes should default to 1048576
Browse files Browse the repository at this point in the history
Saram should match the max.request.size default from the Java producer config.

https://kafka.apache.org/documentation/#producerconfigs_max.request.size

Note that the server has its own limit on the record batch size which
defaults to slightly higher than this, but is configurable and can also
be set per topic too.

https://kafka.apache.org/documentation/#brokerconfigs_message.max.bytes

Co-authord-by: Cassondra Foesch <[email protected]>
Signed-off-by: Dominic Evans <[email protected]>
  • Loading branch information
puellanivis authored and dnwe committed Feb 22, 2024
1 parent 71f19e4 commit aa753c0
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 @@ -523,7 +523,7 @@ func NewConfig() *Config {
c.Metadata.Full = true
c.Metadata.AllowAutoTopicCreation = true

c.Producer.MaxMessageBytes = 1000000
c.Producer.MaxMessageBytes = 1024 * 1024
c.Producer.RequiredAcks = WaitForLocal
c.Producer.Timeout = 10 * time.Second
c.Producer.Partitioner = NewHashPartitioner
Expand Down

0 comments on commit aa753c0

Please sign in to comment.