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