Merge branch 'rebalance-listener' into stored-state
[demos/kafka/training] / src / main / java / de / juplo / kafka / Application.java
index 85d0e07..bcbf418 100644 (file)
@@ -19,7 +19,7 @@ public class Application
 
 
   @Bean
-  public EndlessConsumer consumer()
+  public EndlessConsumer consumer(PartitionStatisticsRepository repository)
   {
     Assert.hasText(properties.getBootstrapServer(), "consumer.bootstrap-server must be set");
     Assert.hasText(properties.getGroupId(), "consumer.group-id must be set");
@@ -29,10 +29,12 @@ public class Application
     EndlessConsumer consumer =
         new EndlessConsumer(
             Executors.newFixedThreadPool(1),
+            repository,
             properties.getBootstrapServer(),
             properties.getGroupId(),
             properties.getClientId(),
-            properties.getTopic());
+            properties.getTopic(),
+            properties.getAutoOffsetReset());
 
     consumer.start();