Class SupervisorConfiguration
- java.lang.Object
-
- pl.allegro.tech.hermes.consumers.config.SupervisorConfiguration
-
@Configuration @EnableConfigurationProperties({CommitOffsetProperties.class,KafkaClustersProperties.class,WorkloadProperties.class,CommonConsumerProperties.class}) public class SupervisorConfiguration extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description SupervisorConfiguration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BalancingListenerbalancingListener(ConsumerNodeLoadRegistry consumerNodeLoadRegistry, SubscriptionProfileRegistry subscriptionProfileRegistry, WorkloadProperties workloadProperties, CurrentLoadProvider currentLoadProvider, WeightedWorkloadMetrics weightedWorkloadMetrics, java.time.Clock clock)ClusterAssignmentCacheclusterAssignmentCache(org.apache.curator.framework.CuratorFramework curator, KafkaClustersProperties kafkaClustersProperties, pl.allegro.tech.hermes.infrastructure.zookeeper.ZookeeperPaths zookeeperPaths, SubscriptionIds subscriptionIds, ConsumerNodesRegistry consumerNodesRegistry, pl.allegro.tech.hermes.infrastructure.dc.DatacenterNameProvider datacenterNameProvider)ConsumerAssignmentCacheconsumerAssignmentCache(org.apache.curator.framework.CuratorFramework curator, WorkloadProperties workloadProperties, KafkaClustersProperties kafkaClustersProperties, pl.allegro.tech.hermes.infrastructure.zookeeper.ZookeeperPaths zookeeperPaths, SubscriptionIds subscriptionIds, pl.allegro.tech.hermes.infrastructure.dc.DatacenterNameProvider datacenterNameProvider)ConsumerAssignmentRegistryconsumerAssignmentRegistry(org.apache.curator.framework.CuratorFramework curator, WorkloadProperties workloadProperties, KafkaClustersProperties kafkaClustersProperties, pl.allegro.tech.hermes.infrastructure.zookeeper.ZookeeperPaths zookeeperPaths, SubscriptionIds subscriptionIds, pl.allegro.tech.hermes.infrastructure.dc.DatacenterNameProvider datacenterNameProvider)ConsumerFactoryconsumerFactory(ReceiverFactory messageReceiverFactory, pl.allegro.tech.hermes.common.metric.HermesMetrics hermesMetrics, CommonConsumerProperties commonConsumerProperties, ConsumerRateLimitSupervisor consumerRateLimitSupervisor, OutputRateCalculatorFactory outputRateCalculatorFactory, pl.allegro.tech.hermes.tracker.consumers.Trackers trackers, OffsetQueue offsetQueue, ConsumerMessageSenderFactory consumerMessageSenderFactory, pl.allegro.tech.hermes.domain.topic.TopicRepository topicRepository, MessageConverterResolver messageConverterResolver, MessageBatchFactory byteBufferMessageBatchFactory, pl.allegro.tech.hermes.common.message.wrapper.CompositeMessageContentWrapper compositeMessageContentWrapper, MessageBatchSenderFactory batchSenderFactory, ConsumerAuthorizationHandler consumerAuthorizationHandler, java.time.Clock clock, SubscriptionLoadRecordersRegistry subscriptionLoadRecordersRegistry)ConsumerNodeLoadRegistryconsumerNodeLoadRegistry(org.apache.curator.framework.CuratorFramework curator, SubscriptionIds subscriptionIds, pl.allegro.tech.hermes.infrastructure.zookeeper.ZookeeperPaths zookeeperPaths, WorkloadProperties workloadProperties, KafkaClustersProperties kafkaClustersProperties, pl.allegro.tech.hermes.infrastructure.dc.DatacenterNameProvider datacenterNameProvider, pl.allegro.tech.hermes.common.concurrent.ExecutorServiceFactory executorServiceFactory, java.time.Clock clock, pl.allegro.tech.hermes.common.metric.HermesMetrics metrics)ConsumersExecutorServiceconsumersExecutorService(CommonConsumerProperties commonConsumerProperties, pl.allegro.tech.hermes.common.metric.HermesMetrics hermesMetrics)ConsumersRuntimeMonitorconsumersRuntimeMonitor(ConsumersSupervisor consumerSupervisor, WorkloadSupervisor workloadSupervisor, pl.allegro.tech.hermes.common.metric.HermesMetrics hermesMetrics, SubscriptionsCache subscriptionsCache, WorkloadProperties workloadProperties)CurrentLoadProvidercurrentLoadProvider()ConsumersSupervisornonblockingConsumersSupervisor(CommonConsumerProperties commonConsumerProperties, ConsumersExecutorService executor, ConsumerFactory consumerFactory, OffsetQueue offsetQueue, ConsumerPartitionAssignmentState consumerPartitionAssignmentState, Retransmitter retransmitter, UndeliveredMessageLogPersister undeliveredMessageLogPersister, pl.allegro.tech.hermes.domain.subscription.SubscriptionRepository subscriptionRepository, pl.allegro.tech.hermes.common.metric.HermesMetrics metrics, ConsumerMonitor monitor, java.time.Clock clock, CommitOffsetProperties commitOffsetProperties)Retransmitterretransmitter(pl.allegro.tech.hermes.common.kafka.offset.SubscriptionOffsetChangeIndicator subscriptionOffsetChangeIndicator, KafkaClustersProperties kafkaClustersProperties, pl.allegro.tech.hermes.infrastructure.dc.DatacenterNameProvider datacenterNameProvider)SubscriptionProfileRegistrysubscriptionProfileRegistry(org.apache.curator.framework.CuratorFramework curator, SubscriptionIds subscriptionIds, pl.allegro.tech.hermes.infrastructure.zookeeper.ZookeeperPaths zookeeperPaths, WorkloadProperties workloadProperties, KafkaClustersProperties kafkaClustersProperties, pl.allegro.tech.hermes.infrastructure.dc.DatacenterNameProvider datacenterNameProvider)TargetWeightCalculatortargetWeightCalculator(WorkloadProperties workloadProperties, WeightedWorkloadMetrics weightedWorkloadMetrics, java.time.Clock clock)WeightedWorkloadMetricsweightedWorkloadMetrics(pl.allegro.tech.hermes.common.metric.HermesMetrics hermesMetrics)WorkBalancerworkBalancer(WorkloadProperties workloadProperties, java.time.Clock clock, CurrentLoadProvider currentLoadProvider, TargetWeightCalculator targetWeightCalculator)WorkloadSupervisorworkloadSupervisor(pl.allegro.tech.hermes.domain.notifications.InternalNotificationsBus notificationsBus, ConsumerNodesRegistry consumerNodesRegistry, ConsumerAssignmentRegistry assignmentRegistry, ConsumerAssignmentCache consumerAssignmentCache, ClusterAssignmentCache clusterAssignmentCache, SubscriptionsCache subscriptionsCache, ConsumersSupervisor supervisor, pl.allegro.tech.hermes.common.admin.zookeeper.ZookeeperAdminCache adminCache, pl.allegro.tech.hermes.common.metric.HermesMetrics metrics, WorkloadProperties workloadProperties, KafkaClustersProperties kafkaClustersProperties, pl.allegro.tech.hermes.domain.workload.constraints.WorkloadConstraintsRepository workloadConstraintsRepository, pl.allegro.tech.hermes.infrastructure.dc.DatacenterNameProvider datacenterNameProvider, WorkBalancer workBalancer, BalancingListener balancingListener)
-
-
-
Method Detail
-
workloadSupervisor
@Bean(initMethod="start", destroyMethod="shutdown") public WorkloadSupervisor workloadSupervisor(pl.allegro.tech.hermes.domain.notifications.InternalNotificationsBus notificationsBus, ConsumerNodesRegistry consumerNodesRegistry, ConsumerAssignmentRegistry assignmentRegistry, ConsumerAssignmentCache consumerAssignmentCache, ClusterAssignmentCache clusterAssignmentCache, SubscriptionsCache subscriptionsCache, ConsumersSupervisor supervisor, pl.allegro.tech.hermes.common.admin.zookeeper.ZookeeperAdminCache adminCache, pl.allegro.tech.hermes.common.metric.HermesMetrics metrics, WorkloadProperties workloadProperties, KafkaClustersProperties kafkaClustersProperties, pl.allegro.tech.hermes.domain.workload.constraints.WorkloadConstraintsRepository workloadConstraintsRepository, pl.allegro.tech.hermes.infrastructure.dc.DatacenterNameProvider datacenterNameProvider, WorkBalancer workBalancer, BalancingListener balancingListener)
-
workBalancer
@Bean public WorkBalancer workBalancer(WorkloadProperties workloadProperties, java.time.Clock clock, CurrentLoadProvider currentLoadProvider, TargetWeightCalculator targetWeightCalculator)
-
consumerNodeLoadRegistry
@Bean(initMethod="start", destroyMethod="stop") public ConsumerNodeLoadRegistry consumerNodeLoadRegistry(org.apache.curator.framework.CuratorFramework curator, SubscriptionIds subscriptionIds, pl.allegro.tech.hermes.infrastructure.zookeeper.ZookeeperPaths zookeeperPaths, WorkloadProperties workloadProperties, KafkaClustersProperties kafkaClustersProperties, pl.allegro.tech.hermes.infrastructure.dc.DatacenterNameProvider datacenterNameProvider, pl.allegro.tech.hermes.common.concurrent.ExecutorServiceFactory executorServiceFactory, java.time.Clock clock, pl.allegro.tech.hermes.common.metric.HermesMetrics metrics)
-
targetWeightCalculator
@Bean public TargetWeightCalculator targetWeightCalculator(WorkloadProperties workloadProperties, WeightedWorkloadMetrics weightedWorkloadMetrics, java.time.Clock clock)
-
balancingListener
@Bean public BalancingListener balancingListener(ConsumerNodeLoadRegistry consumerNodeLoadRegistry, SubscriptionProfileRegistry subscriptionProfileRegistry, WorkloadProperties workloadProperties, CurrentLoadProvider currentLoadProvider, WeightedWorkloadMetrics weightedWorkloadMetrics, java.time.Clock clock)
-
currentLoadProvider
@Bean public CurrentLoadProvider currentLoadProvider()
-
weightedWorkloadMetrics
@Bean public WeightedWorkloadMetrics weightedWorkloadMetrics(pl.allegro.tech.hermes.common.metric.HermesMetrics hermesMetrics)
-
subscriptionProfileRegistry
@Bean public SubscriptionProfileRegistry subscriptionProfileRegistry(org.apache.curator.framework.CuratorFramework curator, SubscriptionIds subscriptionIds, pl.allegro.tech.hermes.infrastructure.zookeeper.ZookeeperPaths zookeeperPaths, WorkloadProperties workloadProperties, KafkaClustersProperties kafkaClustersProperties, pl.allegro.tech.hermes.infrastructure.dc.DatacenterNameProvider datacenterNameProvider)
-
retransmitter
@Bean public Retransmitter retransmitter(pl.allegro.tech.hermes.common.kafka.offset.SubscriptionOffsetChangeIndicator subscriptionOffsetChangeIndicator, KafkaClustersProperties kafkaClustersProperties, pl.allegro.tech.hermes.infrastructure.dc.DatacenterNameProvider datacenterNameProvider)
-
consumerFactory
@Bean public ConsumerFactory consumerFactory(ReceiverFactory messageReceiverFactory, pl.allegro.tech.hermes.common.metric.HermesMetrics hermesMetrics, CommonConsumerProperties commonConsumerProperties, ConsumerRateLimitSupervisor consumerRateLimitSupervisor, OutputRateCalculatorFactory outputRateCalculatorFactory, pl.allegro.tech.hermes.tracker.consumers.Trackers trackers, OffsetQueue offsetQueue, ConsumerMessageSenderFactory consumerMessageSenderFactory, pl.allegro.tech.hermes.domain.topic.TopicRepository topicRepository, MessageConverterResolver messageConverterResolver, MessageBatchFactory byteBufferMessageBatchFactory, pl.allegro.tech.hermes.common.message.wrapper.CompositeMessageContentWrapper compositeMessageContentWrapper, MessageBatchSenderFactory batchSenderFactory, ConsumerAuthorizationHandler consumerAuthorizationHandler, java.time.Clock clock, SubscriptionLoadRecordersRegistry subscriptionLoadRecordersRegistry)
-
consumersExecutorService
@Bean public ConsumersExecutorService consumersExecutorService(CommonConsumerProperties commonConsumerProperties, pl.allegro.tech.hermes.common.metric.HermesMetrics hermesMetrics)
-
nonblockingConsumersSupervisor
@Bean public ConsumersSupervisor nonblockingConsumersSupervisor(CommonConsumerProperties commonConsumerProperties, ConsumersExecutorService executor, ConsumerFactory consumerFactory, OffsetQueue offsetQueue, ConsumerPartitionAssignmentState consumerPartitionAssignmentState, Retransmitter retransmitter, UndeliveredMessageLogPersister undeliveredMessageLogPersister, pl.allegro.tech.hermes.domain.subscription.SubscriptionRepository subscriptionRepository, pl.allegro.tech.hermes.common.metric.HermesMetrics metrics, ConsumerMonitor monitor, java.time.Clock clock, CommitOffsetProperties commitOffsetProperties)
-
consumersRuntimeMonitor
@Bean(initMethod="start", destroyMethod="shutdown") public ConsumersRuntimeMonitor consumersRuntimeMonitor(ConsumersSupervisor consumerSupervisor, WorkloadSupervisor workloadSupervisor, pl.allegro.tech.hermes.common.metric.HermesMetrics hermesMetrics, SubscriptionsCache subscriptionsCache, WorkloadProperties workloadProperties)
-
consumerAssignmentRegistry
@Bean public ConsumerAssignmentRegistry consumerAssignmentRegistry(org.apache.curator.framework.CuratorFramework curator, WorkloadProperties workloadProperties, KafkaClustersProperties kafkaClustersProperties, pl.allegro.tech.hermes.infrastructure.zookeeper.ZookeeperPaths zookeeperPaths, SubscriptionIds subscriptionIds, pl.allegro.tech.hermes.infrastructure.dc.DatacenterNameProvider datacenterNameProvider)
-
clusterAssignmentCache
@Bean public ClusterAssignmentCache clusterAssignmentCache(org.apache.curator.framework.CuratorFramework curator, KafkaClustersProperties kafkaClustersProperties, pl.allegro.tech.hermes.infrastructure.zookeeper.ZookeeperPaths zookeeperPaths, SubscriptionIds subscriptionIds, ConsumerNodesRegistry consumerNodesRegistry, pl.allegro.tech.hermes.infrastructure.dc.DatacenterNameProvider datacenterNameProvider)
-
consumerAssignmentCache
@Bean(initMethod="start", destroyMethod="stop") public ConsumerAssignmentCache consumerAssignmentCache(org.apache.curator.framework.CuratorFramework curator, WorkloadProperties workloadProperties, KafkaClustersProperties kafkaClustersProperties, pl.allegro.tech.hermes.infrastructure.zookeeper.ZookeeperPaths zookeeperPaths, SubscriptionIds subscriptionIds, pl.allegro.tech.hermes.infrastructure.dc.DatacenterNameProvider datacenterNameProvider)
-
-