
pl.allegro.tech.hermes.management.config.detection.InactiveTopicsDetectionConfig Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hermes-management Show documentation
Show all versions of hermes-management Show documentation
Fast and reliable message broker built on top of Kafka.
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