From 448584900cfc8ba4542286e7ae814bb77cb30faa Mon Sep 17 00:00:00 2001 From: klegul Date: Wed, 20 Nov 2024 15:38:06 +0100 Subject: [PATCH] Add timeout to create topic request in Kafka publisher --- pkg/kafka/kafka-publisher.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/kafka/kafka-publisher.go b/pkg/kafka/kafka-publisher.go index dbb8d44..546e86b 100644 --- a/pkg/kafka/kafka-publisher.go +++ b/pkg/kafka/kafka-publisher.go @@ -244,6 +244,7 @@ func ensureTopic(br *sarama.Broker, timeout time.Duration, topicName string, kCo }, }, }, + Timeout: timeout, } ticker := time.NewTicker(100 * time.Millisecond) tout := time.NewTimer(timeout)