Class CommonConfiguration
java.lang.Object
pl.allegro.tech.hermes.consumers.config.CommonConfiguration
@Configuration
@EnableConfigurationProperties({MetricsProperties.class,MicrometerRegistryProperties.class,PrometheusProperties.class,SchemaProperties.class,ZookeeperClustersProperties.class,ContentRootProperties.class,DatacenterNameProperties.class})
public class CommonConfiguration
extends Object
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclock()io.micrometer.core.instrument.MeterRegistrycompositeMeterRegistry(List<io.micrometer.core.instrument.MeterRegistry> registries) pl.allegro.tech.hermes.common.di.factories.CuratorClientFactorycuratorClientFactory(ZookeeperClustersProperties zookeeperClustersProperties, pl.allegro.tech.hermes.infrastructure.dc.DatacenterNameProvider datacenterNameProvider) pl.allegro.tech.hermes.infrastructure.dc.DatacenterNameProviderdcNameProvider(DatacenterNameProperties datacenterNameProperties) pl.allegro.tech.hermes.common.concurrent.ExecutorServiceFactorypl.allegro.tech.hermes.domain.group.GroupRepositorygroupRepository(org.apache.curator.framework.CuratorFramework zookeeper, pl.allegro.tech.hermes.infrastructure.zookeeper.ZookeeperPaths paths, com.fasterxml.jackson.databind.ObjectMapper mapper) org.apache.curator.framework.CuratorFrameworkhermesCurator(ZookeeperClustersProperties zookeeperClustersProperties, pl.allegro.tech.hermes.common.di.factories.CuratorClientFactory curatorClientFactory, pl.allegro.tech.hermes.infrastructure.dc.DatacenterNameProvider datacenterNameProvider) pl.allegro.tech.hermes.common.util.InstanceIdResolverpl.allegro.tech.hermes.common.metric.executor.InstrumentedExecutorServiceFactoryinstrumentedExecutorServiceFactory(pl.allegro.tech.hermes.common.metric.MetricsFacade metricsFacade) pl.allegro.tech.hermes.common.message.wrapper.CompositeMessageContentWrappermessageContentWrapper(com.fasterxml.jackson.databind.ObjectMapper mapper, Clock clock, pl.allegro.tech.hermes.schema.SchemaRepository schemaRepository, pl.allegro.tech.hermes.common.metric.MetricsFacade metricsFacade, SchemaProperties schemaProperties, ContentRootProperties contentRootProperties) pl.allegro.tech.hermes.common.metric.MetricsFacademetricsFacade(io.micrometer.core.instrument.MeterRegistry meterRegistry) io.micrometer.prometheusmetrics.PrometheusMeterRegistrymicrometerRegistry(pl.allegro.tech.hermes.common.di.factories.MicrometerRegistryParameters micrometerRegistryParameters, io.micrometer.prometheusmetrics.PrometheusConfig prometheusConfig, pl.allegro.tech.hermes.common.metric.counter.CounterStorage counterStorage) pl.allegro.tech.hermes.infrastructure.zookeeper.cache.ModelAwareZookeeperNotifyingCachemodelAwareZookeeperNotifyingCache(org.apache.curator.framework.CuratorFramework curator, pl.allegro.tech.hermes.common.metric.MetricsFacade metricsFacade, ZookeeperClustersProperties zookeeperClustersProperties, pl.allegro.tech.hermes.infrastructure.dc.DatacenterNameProvider datacenterNameProvider) pl.allegro.tech.hermes.domain.oauth.OAuthProviderRepositoryoAuthProviderRepository(org.apache.curator.framework.CuratorFramework zookeeper, pl.allegro.tech.hermes.infrastructure.zookeeper.ZookeeperPaths paths, com.fasterxml.jackson.databind.ObjectMapper mapper) com.fasterxml.jackson.databind.ObjectMapperobjectMapper(SchemaProperties schemaProperties) pl.allegro.tech.hermes.metrics.PathsCompilerpathsCompiler(pl.allegro.tech.hermes.common.util.InstanceIdResolver instanceIdResolver) pl.allegro.tech.hermes.common.kafka.KafkaNamesMapperprodKafkaNamesMapper(KafkaClustersProperties kafkaClustersProperties) pl.allegro.tech.hermes.infrastructure.zookeeper.counter.SharedCountersharedCounter(org.apache.curator.framework.CuratorFramework zookeeper, ZookeeperClustersProperties zookeeperClustersProperties, MetricsProperties metricsProperties, pl.allegro.tech.hermes.infrastructure.dc.DatacenterNameProvider datacenterNameProvider) pl.allegro.tech.hermes.common.kafka.offset.SubscriptionOffsetChangeIndicatorsubscriptionOffsetChangeIndicatorFactory(org.apache.curator.framework.CuratorFramework zookeeper, pl.allegro.tech.hermes.infrastructure.zookeeper.ZookeeperPaths paths, pl.allegro.tech.hermes.domain.subscription.SubscriptionRepository subscriptionRepository) pl.allegro.tech.hermes.domain.subscription.SubscriptionRepositorysubscriptionRepository(org.apache.curator.framework.CuratorFramework zookeeper, pl.allegro.tech.hermes.infrastructure.zookeeper.ZookeeperPaths paths, com.fasterxml.jackson.databind.ObjectMapper mapper, pl.allegro.tech.hermes.domain.topic.TopicRepository topicRepository) pl.allegro.tech.hermes.domain.topic.TopicRepositorytopicRepository(org.apache.curator.framework.CuratorFramework zookeeper, pl.allegro.tech.hermes.infrastructure.zookeeper.ZookeeperPaths paths, com.fasterxml.jackson.databind.ObjectMapper mapper, pl.allegro.tech.hermes.domain.group.GroupRepository groupRepository) pl.allegro.tech.hermes.common.message.undelivered.UndeliveredMessageLogundeliveredMessageLog(org.apache.curator.framework.CuratorFramework zookeeper, pl.allegro.tech.hermes.infrastructure.zookeeper.ZookeeperPaths paths, com.fasterxml.jackson.databind.ObjectMapper mapper, pl.allegro.tech.hermes.common.metric.MetricsFacade metricsFacade) pl.allegro.tech.hermes.domain.workload.constraints.WorkloadConstraintsRepositoryworkloadConstraintsRepository(org.apache.curator.framework.CuratorFramework curator, com.fasterxml.jackson.databind.ObjectMapper mapper, pl.allegro.tech.hermes.infrastructure.zookeeper.ZookeeperPaths paths) pl.allegro.tech.hermes.common.admin.zookeeper.ZookeeperAdminCachezookeeperAdminCache(pl.allegro.tech.hermes.infrastructure.zookeeper.ZookeeperPaths zookeeperPaths, org.apache.curator.framework.CuratorFramework client, com.fasterxml.jackson.databind.ObjectMapper objectMapper, Clock clock) pl.allegro.tech.hermes.common.metric.counter.CounterStoragezookeeperCounterStorage(pl.allegro.tech.hermes.infrastructure.zookeeper.counter.SharedCounter sharedCounter, pl.allegro.tech.hermes.domain.subscription.SubscriptionRepository subscriptionRepository, pl.allegro.tech.hermes.metrics.PathsCompiler pathsCompiler, ZookeeperClustersProperties zookeeperClustersProperties, pl.allegro.tech.hermes.infrastructure.dc.DatacenterNameProvider datacenterNameProvider) pl.allegro.tech.hermes.domain.notifications.InternalNotificationsBuszookeeperInternalNotificationBus(com.fasterxml.jackson.databind.ObjectMapper objectMapper, pl.allegro.tech.hermes.infrastructure.zookeeper.cache.ModelAwareZookeeperNotifyingCache modelNotifyingCache) pl.allegro.tech.hermes.infrastructure.zookeeper.ZookeeperPathszookeeperPaths(ZookeeperClustersProperties zookeeperClustersProperties, pl.allegro.tech.hermes.infrastructure.dc.DatacenterNameProvider datacenterNameProvider)
-
Constructor Details
-
CommonConfiguration
public CommonConfiguration()
-
-
Method Details
-
dcNameProvider
@Bean public pl.allegro.tech.hermes.infrastructure.dc.DatacenterNameProvider dcNameProvider(DatacenterNameProperties datacenterNameProperties) -
subscriptionRepository
@Bean public pl.allegro.tech.hermes.domain.subscription.SubscriptionRepository subscriptionRepository(org.apache.curator.framework.CuratorFramework zookeeper, pl.allegro.tech.hermes.infrastructure.zookeeper.ZookeeperPaths paths, com.fasterxml.jackson.databind.ObjectMapper mapper, pl.allegro.tech.hermes.domain.topic.TopicRepository topicRepository) -
oAuthProviderRepository
@Bean public pl.allegro.tech.hermes.domain.oauth.OAuthProviderRepository oAuthProviderRepository(org.apache.curator.framework.CuratorFramework zookeeper, pl.allegro.tech.hermes.infrastructure.zookeeper.ZookeeperPaths paths, com.fasterxml.jackson.databind.ObjectMapper mapper) -
topicRepository
@Bean public pl.allegro.tech.hermes.domain.topic.TopicRepository topicRepository(org.apache.curator.framework.CuratorFramework zookeeper, pl.allegro.tech.hermes.infrastructure.zookeeper.ZookeeperPaths paths, com.fasterxml.jackson.databind.ObjectMapper mapper, pl.allegro.tech.hermes.domain.group.GroupRepository groupRepository) -
groupRepository
@Bean public pl.allegro.tech.hermes.domain.group.GroupRepository groupRepository(org.apache.curator.framework.CuratorFramework zookeeper, pl.allegro.tech.hermes.infrastructure.zookeeper.ZookeeperPaths paths, com.fasterxml.jackson.databind.ObjectMapper mapper) -
hermesCurator
@Bean(destroyMethod="close") public org.apache.curator.framework.CuratorFramework hermesCurator(ZookeeperClustersProperties zookeeperClustersProperties, pl.allegro.tech.hermes.common.di.factories.CuratorClientFactory curatorClientFactory, pl.allegro.tech.hermes.infrastructure.dc.DatacenterNameProvider datacenterNameProvider) -
curatorClientFactory
@Bean public pl.allegro.tech.hermes.common.di.factories.CuratorClientFactory curatorClientFactory(ZookeeperClustersProperties zookeeperClustersProperties, pl.allegro.tech.hermes.infrastructure.dc.DatacenterNameProvider datacenterNameProvider) -
zookeeperInternalNotificationBus
@Bean public pl.allegro.tech.hermes.domain.notifications.InternalNotificationsBus zookeeperInternalNotificationBus(com.fasterxml.jackson.databind.ObjectMapper objectMapper, pl.allegro.tech.hermes.infrastructure.zookeeper.cache.ModelAwareZookeeperNotifyingCache modelNotifyingCache) -
modelAwareZookeeperNotifyingCache
@Bean(destroyMethod="stop") public pl.allegro.tech.hermes.infrastructure.zookeeper.cache.ModelAwareZookeeperNotifyingCache modelAwareZookeeperNotifyingCache(org.apache.curator.framework.CuratorFramework curator, pl.allegro.tech.hermes.common.metric.MetricsFacade metricsFacade, ZookeeperClustersProperties zookeeperClustersProperties, pl.allegro.tech.hermes.infrastructure.dc.DatacenterNameProvider datacenterNameProvider) -
undeliveredMessageLog
@Bean public pl.allegro.tech.hermes.common.message.undelivered.UndeliveredMessageLog undeliveredMessageLog(org.apache.curator.framework.CuratorFramework zookeeper, pl.allegro.tech.hermes.infrastructure.zookeeper.ZookeeperPaths paths, com.fasterxml.jackson.databind.ObjectMapper mapper, pl.allegro.tech.hermes.common.metric.MetricsFacade metricsFacade) -
instrumentedExecutorServiceFactory
@Bean public pl.allegro.tech.hermes.common.metric.executor.InstrumentedExecutorServiceFactory instrumentedExecutorServiceFactory(pl.allegro.tech.hermes.common.metric.MetricsFacade metricsFacade) -
zookeeperAdminCache
@Bean public pl.allegro.tech.hermes.common.admin.zookeeper.ZookeeperAdminCache zookeeperAdminCache(pl.allegro.tech.hermes.infrastructure.zookeeper.ZookeeperPaths zookeeperPaths, org.apache.curator.framework.CuratorFramework client, com.fasterxml.jackson.databind.ObjectMapper objectMapper, Clock clock) -
objectMapper
@Bean public com.fasterxml.jackson.databind.ObjectMapper objectMapper(SchemaProperties schemaProperties) -
messageContentWrapper
@Bean public pl.allegro.tech.hermes.common.message.wrapper.CompositeMessageContentWrapper messageContentWrapper(com.fasterxml.jackson.databind.ObjectMapper mapper, Clock clock, pl.allegro.tech.hermes.schema.SchemaRepository schemaRepository, pl.allegro.tech.hermes.common.metric.MetricsFacade metricsFacade, SchemaProperties schemaProperties, ContentRootProperties contentRootProperties) -
prodKafkaNamesMapper
@Bean public pl.allegro.tech.hermes.common.kafka.KafkaNamesMapper prodKafkaNamesMapper(KafkaClustersProperties kafkaClustersProperties) -
clock
-
zookeeperPaths
@Bean public pl.allegro.tech.hermes.infrastructure.zookeeper.ZookeeperPaths zookeeperPaths(ZookeeperClustersProperties zookeeperClustersProperties, pl.allegro.tech.hermes.infrastructure.dc.DatacenterNameProvider datacenterNameProvider) -
workloadConstraintsRepository
@Bean public pl.allegro.tech.hermes.domain.workload.constraints.WorkloadConstraintsRepository workloadConstraintsRepository(org.apache.curator.framework.CuratorFramework curator, com.fasterxml.jackson.databind.ObjectMapper mapper, pl.allegro.tech.hermes.infrastructure.zookeeper.ZookeeperPaths paths) -
metricsFacade
@Bean public pl.allegro.tech.hermes.common.metric.MetricsFacade metricsFacade(io.micrometer.core.instrument.MeterRegistry meterRegistry) -
micrometerRegistry
@Bean public io.micrometer.prometheusmetrics.PrometheusMeterRegistry micrometerRegistry(pl.allegro.tech.hermes.common.di.factories.MicrometerRegistryParameters micrometerRegistryParameters, io.micrometer.prometheusmetrics.PrometheusConfig prometheusConfig, pl.allegro.tech.hermes.common.metric.counter.CounterStorage counterStorage) -
compositeMeterRegistry
@Bean @Primary public io.micrometer.core.instrument.MeterRegistry compositeMeterRegistry(List<io.micrometer.core.instrument.MeterRegistry> registries) -
moduleName
-
pathsCompiler
@Bean public pl.allegro.tech.hermes.metrics.PathsCompiler pathsCompiler(pl.allegro.tech.hermes.common.util.InstanceIdResolver instanceIdResolver) -
instanceIdResolver
@Bean public pl.allegro.tech.hermes.common.util.InstanceIdResolver instanceIdResolver() -
subscriptionOffsetChangeIndicatorFactory
@Bean public pl.allegro.tech.hermes.common.kafka.offset.SubscriptionOffsetChangeIndicator subscriptionOffsetChangeIndicatorFactory(org.apache.curator.framework.CuratorFramework zookeeper, pl.allegro.tech.hermes.infrastructure.zookeeper.ZookeeperPaths paths, pl.allegro.tech.hermes.domain.subscription.SubscriptionRepository subscriptionRepository) -
executorServiceFactory
@Bean public pl.allegro.tech.hermes.common.concurrent.ExecutorServiceFactory executorServiceFactory()
-