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()
23 EndlessConsumer consumer =
25 Executors.newFixedThreadPool(1),
26 properties.getBootstrapServer(),
27 properties.getGroupId(),
28 properties.getClientId(),
29 properties.getTopic(),
30 properties.getAutoOffsetReset());
37 public static void main(String[] args)
39 SpringApplication.run(Application.class, args);