From 627763878b235ba168c7f55a1ef448851b027bfc Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Fri, 2 Sep 2022 05:22:50 +0200 Subject: [PATCH] =?utf8?q?Funktionsunabh=C3=A4ngiger=20Name=20f=C3=BCr=20d?= =?utf8?q?as=20erweiterte=20Interface=20RebalanceListener?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/main/java/de/juplo/kafka/ApplicationRebalanceListener.java | 2 +- src/main/java/de/juplo/kafka/EndlessConsumer.java | 2 +- ...ingConsumerRebalanceListener.java => RebalanceListener.java} | 2 +- src/test/java/de/juplo/kafka/GenericApplicationTests.java | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) rename src/main/java/de/juplo/kafka/{CommittingConsumerRebalanceListener.java => RebalanceListener.java} (62%) diff --git a/src/main/java/de/juplo/kafka/ApplicationRebalanceListener.java b/src/main/java/de/juplo/kafka/ApplicationRebalanceListener.java index d319295..63d57df 100644 --- a/src/main/java/de/juplo/kafka/ApplicationRebalanceListener.java +++ b/src/main/java/de/juplo/kafka/ApplicationRebalanceListener.java @@ -10,7 +10,7 @@ import java.util.*; @RequiredArgsConstructor @Slf4j -public class ApplicationRebalanceListener implements CommittingConsumerRebalanceListener +public class ApplicationRebalanceListener implements RebalanceListener { private final ApplicationRecordHandler recordHandler; private final AdderResults adderResults; diff --git a/src/main/java/de/juplo/kafka/EndlessConsumer.java b/src/main/java/de/juplo/kafka/EndlessConsumer.java index 63fc10f..3ff479c 100644 --- a/src/main/java/de/juplo/kafka/EndlessConsumer.java +++ b/src/main/java/de/juplo/kafka/EndlessConsumer.java @@ -25,7 +25,7 @@ public class EndlessConsumer implements Runnable private final String id; private final String topic; private final Consumer consumer; - private final CommittingConsumerRebalanceListener rebalanceListener; + private final RebalanceListener rebalanceListener; private final RecordHandler recordHandler; private final Lock lock = new ReentrantLock(); diff --git a/src/main/java/de/juplo/kafka/CommittingConsumerRebalanceListener.java b/src/main/java/de/juplo/kafka/RebalanceListener.java similarity index 62% rename from src/main/java/de/juplo/kafka/CommittingConsumerRebalanceListener.java rename to src/main/java/de/juplo/kafka/RebalanceListener.java index 8aa92c0..26f97aa 100644 --- a/src/main/java/de/juplo/kafka/CommittingConsumerRebalanceListener.java +++ b/src/main/java/de/juplo/kafka/RebalanceListener.java @@ -3,7 +3,7 @@ package de.juplo.kafka; import org.apache.kafka.clients.consumer.ConsumerRebalanceListener; -public interface CommittingConsumerRebalanceListener extends ConsumerRebalanceListener +public interface RebalanceListener extends ConsumerRebalanceListener { void enableCommits(); void disableCommits(); diff --git a/src/test/java/de/juplo/kafka/GenericApplicationTests.java b/src/test/java/de/juplo/kafka/GenericApplicationTests.java index 7335770..8124c81 100644 --- a/src/test/java/de/juplo/kafka/GenericApplicationTests.java +++ b/src/test/java/de/juplo/kafka/GenericApplicationTests.java @@ -66,7 +66,7 @@ abstract class GenericApplicationTests @Autowired MongoProperties mongoProperties; @Autowired - CommittingConsumerRebalanceListener rebalanceListener; + RebalanceListener rebalanceListener; @Autowired RecordHandler recordHandler; -- 2.20.1