Benennung vereinheitlicht und projektunabhängig gemacht
[demos/kafka/training] / src / main / java / de / juplo / kafka / ApplicationConfiguration.java
index 7a0a8ad..e9c26fd 100644 (file)
@@ -17,18 +17,18 @@ import java.util.concurrent.Executors;
 public class ApplicationConfiguration
 {
   @Bean
-  public KeyCountingRecordHandler keyCountingRecordHandler()
+  public ApplicationRecordHandler recordHandler()
   {
-    return new KeyCountingRecordHandler();
+    return new ApplicationRecordHandler();
   }
 
   @Bean
-  public KeyCountingRebalanceListener keyCountingRebalanceListener(
-      KeyCountingRecordHandler keyCountingRecordHandler,
+  public ApplicationRebalanceListener rebalanceListener(
+      ApplicationRecordHandler recordHandler,
       ApplicationProperties properties)
   {
-    return new KeyCountingRebalanceListener(
-        keyCountingRecordHandler,
+    return new ApplicationRebalanceListener(
+        recordHandler,
         properties.getClientId());
   }
 
@@ -36,8 +36,8 @@ public class ApplicationConfiguration
   public EndlessConsumer<String, Long> endlessConsumer(
       KafkaConsumer<String, Long> kafkaConsumer,
       ExecutorService executor,
-      KeyCountingRebalanceListener keyCountingRebalanceListener,
-      KeyCountingRecordHandler keyCountingRecordHandler,
+      ApplicationRebalanceListener rebalanceListener,
+      ApplicationRecordHandler recordHandler,
       ApplicationProperties properties)
   {
     return
@@ -46,8 +46,8 @@ public class ApplicationConfiguration
             properties.getClientId(),
             properties.getTopic(),
             kafkaConsumer,
-            keyCountingRebalanceListener,
-            keyCountingRecordHandler);
+            rebalanceListener,
+            recordHandler);
   }
 
   @Bean