Fix: Der Rebalance-Listener wurde nie registriertgit diff
authorKai Moritz <kai@juplo.de>
Mon, 28 Oct 2024 09:50:00 +0000 (10:50 +0100)
committerKai Moritz <kai@juplo.de>
Fri, 8 Nov 2024 17:21:16 +0000 (18:21 +0100)
src/main/java/de/juplo/kafka/ExampleConsumer.java

index 89cfd0a..10fc5de 100644 (file)
@@ -73,7 +73,7 @@ public class ExampleConsumer implements Runnable, ConsumerRebalanceListener
       done = new boolean[numPartitions];
 
       log.info("{} - Subscribing to topic {}", id, topic);
-      consumer.subscribe(Arrays.asList(topic));
+      consumer.subscribe(Arrays.asList(topic), this);
       running = true;
 
       while (running)