package de.otto.edison.jobs.eventbus;

import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class EventbusConfiguration {

    @Bean
    @ConditionalOnMissingBean(LogJobEventListener.class)
    public LogJobEventListener logEventListener() {
        return new LogJobEventListener();
    }
}

@@ -32,16 +32,132 @@
 ntbus;%0A%0A
+import de.otto.edison.jobs.repository.JobRepository;%0Aimport org.springframework.beans.factory.annotation.Autowired;%0A
 import o
@@ -348,127 +348,343 @@
 n;%0A%0A
-@Configuration%0Apublic class EventbusConfiguration %7B%0A%0A    @Bean%0A    @ConditionalOnMissingBean(LogJobEventListener.class)
+import static java.time.Clock.systemDefaultZone;%0A%0A@Configuration%0A@ConditionalOnMissingBean(EventbusConfiguration.class)%0Apublic class EventbusConfiguration %7B%0A%0A    @Autowired%0A    private JobRepository jobRepository;%0A%0A    @Bean%0A    public JobEventListener logJobEventListener() %7B%0A        return new LogJobEventListener();%0A    %7D%0A%0A    @Bean
 %0A   
@@ -691,19 +691,16 @@
  public 
-Log
 JobEvent
@@ -708,19 +708,30 @@
 istener 
-log
+persistenceJob
 EventLis
@@ -751,35 +751,43 @@
      return new 
-Log
+Persistence
 JobEventListener
@@ -779,27 +779,61 @@
 obEventListener(
+jobRepository, systemDefaultZone()
 );%0A    %7D%0A%7D%0A

configure default event listeners