1 package de.juplo.kafka;
3 import org.springframework.beans.factory.annotation.Autowired;
4 import org.springframework.boot.SpringApplication;
5 import org.springframework.boot.autoconfigure.SpringBootApplication;
6 import org.springframework.boot.context.properties.EnableConfigurationProperties;
7 import org.springframework.context.annotation.Bean;
9 import java.util.concurrent.Executors;
12 @SpringBootApplication
13 @EnableConfigurationProperties(ApplicationProperties.class)
14 public class Application
17 ApplicationProperties properties;
21 public EndlessConsumer consumer(PartitionStatisticsRepository repository)
23 EndlessConsumer consumer =
25 Executors.newFixedThreadPool(1),
27 properties.getBootstrapServer(),
28 properties.getGroupId(),
29 properties.getClientId(),
30 properties.getTopic(),
31 properties.getAutoOffsetReset());
38 public static void main(String[] args)
40 SpringApplication.run(Application.class, args);