From ae93222a9307e4fa2dcb36d60b06708b60b918b8 Mon Sep 17 00:00:00 2001 From: wk989898 Date: Tue, 4 Jun 2024 17:36:05 +0800 Subject: [PATCH] check kafka produce out-of-order https://github.com/IBM/sarama/issues/2619 --- pkg/sink/kafka/sarama.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/sink/kafka/sarama.go b/pkg/sink/kafka/sarama.go index df8877412b3..ec50c20cc2d 100644 --- a/pkg/sink/kafka/sarama.go +++ b/pkg/sink/kafka/sarama.go @@ -70,6 +70,7 @@ func NewSaramaConfig(ctx context.Context, o *Options) (*sarama.Config, error) { config.Net.DialTimeout = o.DialTimeout config.Net.WriteTimeout = o.WriteTimeout config.Net.ReadTimeout = o.ReadTimeout + config.Net.MaxOpenRequests = 1 config.Producer.Partitioner = sarama.NewManualPartitioner config.Producer.MaxMessageBytes = o.MaxMessageBytes