* Dabei auch die letzten Verbesserungen aus 'rebalance-listener' übernommen.
consumer:
image: juplo/endless-consumer:1.0-SNAPSHOT
ports:
- - 8081:8081
+ - 8081:8080
environment:
+ server.port: 8080
consumer.bootstrap-server: kafka:9092
- consumer.client-id: my-group
consumer.client-id: consumer
consumer.topic: test
+ spring.data.mongodb.uri: mongodb://juplo:training@mongo:27017
+ spring.data.mongodb.database: juplo
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-data-mongodb</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-validation</artifactId>
+ </dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
@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");
- Assert.hasText(properties.getClientId(), "consumer.client-id must be set");
- Assert.hasText(properties.getTopic(), "consumer.topic must be set");
-
EndlessConsumer consumer =
new EndlessConsumer(
Executors.newFixedThreadPool(1),
web:
exposure:
include: "*"
+ info:
+ env:
+ enabled: true
+ java:
+ enabled: true
+ info:
+ kafka:
+ bootstrap-server: ${consumer.bootstrap-server}
+ client-id: ${consumer.client-id}
+ group-id: ${consumer.group-id}
+ topic: ${consumer.topic}
+ auto-offset-reset: ${consumer.auto-offset-reset}
+spring:
+ data:
+ mongodb:
+ uri: mongodb://juplo:training@localhost:27017
+ database: juplo
logging:
level:
root: INFO