From ce33666d2019b7c10b1d5747b655a0a565530587 Mon Sep 17 00:00:00 2001 From: Szymon Bogusz Date: Thu, 28 Nov 2024 08:52:49 +0100 Subject: [PATCH] Kafka exception also caught and pass with empty list of topics from kafka --- .../engine/schemedkafka/TopicSelectionStrategy.scala | 3 +++ 1 file changed, 3 insertions(+) diff --git a/utils/schemed-kafka-components-utils/src/main/scala/pl/touk/nussknacker/engine/schemedkafka/TopicSelectionStrategy.scala b/utils/schemed-kafka-components-utils/src/main/scala/pl/touk/nussknacker/engine/schemedkafka/TopicSelectionStrategy.scala index 3d28169bdd2..4d42645ccfa 100644 --- a/utils/schemed-kafka-components-utils/src/main/scala/pl/touk/nussknacker/engine/schemedkafka/TopicSelectionStrategy.scala +++ b/utils/schemed-kafka-components-utils/src/main/scala/pl/touk/nussknacker/engine/schemedkafka/TopicSelectionStrategy.scala @@ -2,6 +2,7 @@ package pl.touk.nussknacker.engine.schemedkafka import cats.data.Validated import org.apache.kafka.clients.admin.ListTopicsOptions +import org.apache.kafka.common.KafkaException import org.apache.kafka.common.errors.TimeoutException import pl.touk.nussknacker.engine.kafka.{KafkaConfig, KafkaUtils, UnspecializedTopicName} import pl.touk.nussknacker.engine.schemedkafka.schemaregistry.{SchemaRegistryClient, SchemaRegistryError} @@ -57,6 +58,8 @@ class AllNonHiddenTopicsSelectionStrategy extends TopicSelectionStrategy { case _: TimeoutException => List.empty case _ => throw err } + case _: KafkaException => + List.empty } }