From: Kai Moritz Date: Wed, 25 Sep 2024 11:57:57 +0000 (+0200) Subject: Einheitliche Benennung des Consumers -- ALIGN X-Git-Tag: grundlagen/simple-consumer--BRANCH-ENDE~8 X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=fc081ee55db80fd459ccedc74f9216a3afc0cc74;p=demos%2Fkafka%2Ftraining Einheitliche Benennung des Consumers -- ALIGN --- diff --git a/pom.xml b/pom.xml index 327625b..7b7363d 100644 --- a/pom.xml +++ b/pom.xml @@ -62,7 +62,7 @@ true libs/ - de.juplo.kafka.SimpleConsumer + de.juplo.kafka.ExampleConsumer diff --git a/src/main/java/de/juplo/kafka/ExampleConsumer.java b/src/main/java/de/juplo/kafka/ExampleConsumer.java index cee2165..1715813 100644 --- a/src/main/java/de/juplo/kafka/ExampleConsumer.java +++ b/src/main/java/de/juplo/kafka/ExampleConsumer.java @@ -14,7 +14,7 @@ import java.util.Properties; @Slf4j -public class SimpleConsumer +public class ExampleConsumer { private final String id; private final String topic; @@ -23,7 +23,7 @@ public class SimpleConsumer private volatile boolean running = false; private long consumed = 0; - public SimpleConsumer(String broker, String topic, String groupId, String clientId) + public ExampleConsumer(String broker, String topic, String groupId, String clientId) { Properties props = new Properties(); props.put("bootstrap.servers", broker); @@ -108,7 +108,7 @@ public class SimpleConsumer } - SimpleConsumer instance = new SimpleConsumer(broker, topic, groupId, clientId); + ExampleConsumer instance = new ExampleConsumer(broker, topic, groupId, clientId); Runtime.getRuntime().addShutdownHook(new Thread(() -> {