From: Kai Moritz Date: Wed, 2 Nov 2022 17:54:37 +0000 (+0100) Subject: WIP X-Git-Tag: simple-consumer--json-DEPRECATED~23 X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=35e92c786ef3e2023633bab1ad47340f0f23043c;p=demos%2Fkafka%2Ftraining WIP --- diff --git a/src/main/java/de/juplo/kafka/SimpleConsumer.java b/src/main/java/de/juplo/kafka/SimpleConsumer.java index 040e24b..72dc36e 100644 --- a/src/main/java/de/juplo/kafka/SimpleConsumer.java +++ b/src/main/java/de/juplo/kafka/SimpleConsumer.java @@ -21,7 +21,6 @@ public class SimpleConsumer implements Runnable private final String topic; private final Consumer consumer; - private volatile boolean running = false; private long consumed = 0; @@ -31,7 +30,7 @@ public class SimpleConsumer implements Runnable try { log.info("{} - Subscribing to topic test", id); - consumer.subscribe(Arrays.asList("test")); + consumer.subscribe(Arrays.asList(topic)); running = true; while (true)