pl.allegro.tech.hermes.management.config.ReadinessConfiguration 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;
import java.util.List;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import pl.allegro.tech.hermes.management.config.storage.StorageClustersProperties;
import pl.allegro.tech.hermes.management.config.storage.StorageProperties;
import pl.allegro.tech.hermes.management.domain.dc.MultiDatacenterRepositoryCommandExecutor;
import pl.allegro.tech.hermes.management.domain.readiness.DatacenterReadinessRepository;
import pl.allegro.tech.hermes.management.domain.readiness.ReadinessService;
@Configuration
public class ReadinessConfiguration {
@Bean
ReadinessService readinessService(
MultiDatacenterRepositoryCommandExecutor commandExecutor,
DatacenterReadinessRepository readinessRepository,
StorageClustersProperties storageClustersProperties) {
List datacenters =
storageClustersProperties.getClusters().stream()
.map(StorageProperties::getDatacenter)
.toList();
return new ReadinessService(commandExecutor, readinessRepository, datacenters);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy