Old entries are removed from the outbox-table in batches
[demos/kafka/outbox] / delivery / src / main / java / de / juplo / kafka / outbox / delivery / Application.java
1 package de.juplo.kafka.outbox.delivery;
2
3 import org.springframework.boot.SpringApplication;
4 import org.springframework.boot.autoconfigure.SpringBootApplication;
5 import org.springframework.boot.context.properties.EnableConfigurationProperties;
6 import org.springframework.context.annotation.Bean;
7 import org.springframework.scheduling.annotation.EnableScheduling;
8
9 import java.time.Clock;
10
11
12 @SpringBootApplication
13 @EnableConfigurationProperties(ApplicationProperties.class)
14 @EnableScheduling
15 public class Application
16 {
17   @Bean
18   public OutboxProducer outboxProducer(
19       ApplicationProperties properties,
20       OutboxRepository repository)
21   {
22     return new OutboxProducer(properties, repository, Clock.systemDefaultZone());
23   }
24
25
26   public static void main(String[] args) throws Exception
27   {
28     SpringApplication.run(Application.class, args);
29   }
30 }