Verbesserungen gemerged 'counting-consumer' -> 'endless-stream-consumer'
[demos/kafka/training] / src / main / java / de / juplo / kafka / ApplicationConfiguration.java
index 7a0a8ad..d0334a2 100644 (file)
@@ -17,27 +17,16 @@ import java.util.concurrent.Executors;
 public class ApplicationConfiguration
 {
   @Bean
-  public KeyCountingRecordHandler keyCountingRecordHandler()
+  public RecordHandler noopRecordHandler()
   {
-    return new KeyCountingRecordHandler();
-  }
-
-  @Bean
-  public KeyCountingRebalanceListener keyCountingRebalanceListener(
-      KeyCountingRecordHandler keyCountingRecordHandler,
-      ApplicationProperties properties)
-  {
-    return new KeyCountingRebalanceListener(
-        keyCountingRecordHandler,
-        properties.getClientId());
+    return record -> {};
   }
 
   @Bean
   public EndlessConsumer<String, Long> endlessConsumer(
       KafkaConsumer<String, Long> kafkaConsumer,
       ExecutorService executor,
-      KeyCountingRebalanceListener keyCountingRebalanceListener,
-      KeyCountingRecordHandler keyCountingRecordHandler,
+      RecordHandler noopRecordHandler,
       ApplicationProperties properties)
   {
     return
@@ -46,8 +35,7 @@ public class ApplicationConfiguration
             properties.getClientId(),
             properties.getTopic(),
             kafkaConsumer,
-            keyCountingRebalanceListener,
-            keyCountingRecordHandler);
+            noopRecordHandler);
   }
 
   @Bean