All Downloads are FREE. Search and download functionalities are using the official Maven repository.

pl.allegro.tech.hermes.management.config.detection.InactiveTopicsDetectionConfig Maven / Gradle / Ivy

There is a newer version: 2.10.4
Show newest version
package pl.allegro.tech.hermes.management.config.detection;

import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import pl.allegro.tech.hermes.management.domain.detection.InactiveTopicsDetectionJob;
import pl.allegro.tech.hermes.management.infrastructure.detection.InactiveTopicsDetectionScheduler;
import pl.allegro.tech.hermes.management.infrastructure.leader.ManagementLeadership;

@Configuration
@EnableConfigurationProperties(InactiveTopicsDetectionProperties.class)
@EnableScheduling
public class InactiveTopicsDetectionConfig {
  @ConditionalOnProperty(
      prefix = "detection.inactive-topics",
      value = "enabled",
      havingValue = "true")
  @Bean
  InactiveTopicsDetectionScheduler inactiveTopicsDetectionScheduler(
      InactiveTopicsDetectionJob job, ManagementLeadership leader) {
    return new InactiveTopicsDetectionScheduler(job, leader);
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy