Merge der Refaktorisierung des EndlessConsumer (Branch 'stored-state')
[demos/kafka/training] / src / main / java / de / juplo / kafka / ApplicationConfiguration.java
index 4054e93..54e9b89 100644 (file)
@@ -32,11 +32,13 @@ public class ApplicationConfiguration
       KafkaConsumer<String, Long> kafkaConsumer,
       ExecutorService executor,
       Consumer<ConsumerRecord<String, Long>> handler,
+      PartitionStatisticsRepository repository,
       ApplicationProperties properties)
   {
     return
         new EndlessConsumer<>(
             executor,
+            repository,
             properties.getClientId(),
             properties.getTopic(),
             kafkaConsumer,
@@ -57,6 +59,7 @@ public class ApplicationConfiguration
     props.put("bootstrap.servers", properties.getBootstrapServer());
     props.put("group.id", properties.getGroupId());
     props.put("client.id", properties.getClientId());
+    props.put("enable.auto.commit", false);
     props.put("auto.offset.reset", properties.getAutoOffsetReset());
     props.put("metadata.max.age.ms", "1000");
     props.put("key.deserializer", StringDeserializer.class.getName());