From: Kai Moritz Date: Mon, 28 Oct 2024 09:50:00 +0000 (+0100) Subject: Fix: Der Rebalance-Listener wurde nie registriertgit diff X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=26965ad7040f369ac1e3d3954f3255f9ef70358b;p=demos%2Fkafka%2Ftraining Fix: Der Rebalance-Listener wurde nie registriertgit diff --- diff --git a/src/main/java/de/juplo/kafka/ExampleConsumer.java b/src/main/java/de/juplo/kafka/ExampleConsumer.java index 119badd..2ad0a93 100644 --- a/src/main/java/de/juplo/kafka/ExampleConsumer.java +++ b/src/main/java/de/juplo/kafka/ExampleConsumer.java @@ -69,7 +69,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)