From aa753c041616d6ac977e6955ed6d71ae88d95df2 Mon Sep 17 00:00:00 2001 From: Cassondra Foesch Date: Thu, 15 Feb 2024 07:45:40 +0000 Subject: [PATCH] fix: message.max.bytes should default to 1048576 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 Signed-off-by: Dominic Evans --- config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.go b/config.go index ad970a3f0..facf76643 100644 --- a/config.go +++ b/config.go @@ -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