From: Kai Moritz Date: Mon, 28 Oct 2024 09:50:00 +0000 (+0100) Subject: Fix: Der Rebalance-Listener wurde nie registriertgit diff X-Git-Tag: consumer/spring-consumer--log-compaction--2024-11-13--si~18 X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=aa68d53b670fc2d83c0b8b2b78eaa664f66c5acc;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 8226f9f..3acaebe 100644 --- a/src/main/java/de/juplo/kafka/ExampleConsumer.java +++ b/src/main/java/de/juplo/kafka/ExampleConsumer.java @@ -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)