From 7523603e8d5bd9704b49a27205aae52acbdb1cbf Mon Sep 17 00:00:00 2001 From: Nathaniel Davidson Date: Thu, 26 Sep 2024 18:20:47 -0700 Subject: [PATCH] don't throw and fail thread when topic not subscribed --- build.gradle | 2 +- .../com/nucleodb/library/mqs/kafka/KafkaConsumerHandler.java | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index 8f4043e..2a713a9 100644 --- a/build.gradle +++ b/build.gradle @@ -7,7 +7,7 @@ plugins { } group = 'com.nucleodb' -version = '1.18.12' +version = '1.18.13' repositories { mavenCentral() diff --git a/src/main/java/com/nucleodb/library/mqs/kafka/KafkaConsumerHandler.java b/src/main/java/com/nucleodb/library/mqs/kafka/KafkaConsumerHandler.java index e9b3ee5..6e903af 100644 --- a/src/main/java/com/nucleodb/library/mqs/kafka/KafkaConsumerHandler.java +++ b/src/main/java/com/nucleodb/library/mqs/kafka/KafkaConsumerHandler.java @@ -176,7 +176,8 @@ public void run() { getConsumer().poll(Duration.ofMillis(100)); Thread.sleep(1000); } catch (InterruptedException e) { - throw new RuntimeException(e); +// throw new RuntimeException(e); + e.printStackTrace(); } } seek(offsets); @@ -189,7 +190,7 @@ public void run() { Thread.sleep(1000); } catch (InterruptedException e) { e.printStackTrace(); - throw new RuntimeException(e); + //throw new RuntimeException(e); } }