Class MultiDCAwareService
java.lang.Object
pl.allegro.tech.hermes.management.infrastructure.kafka.MultiDCAwareService
-
Constructor Summary
ConstructorsConstructorDescriptionMultiDCAwareService(List<BrokersClusterService> clusters, Clock clock, Duration intervalBetweenCheckingIfOffsetsMoved, Duration offsetsMovedTimeout, MultiDatacenterRepositoryCommandExecutor multiDcExecutor) -
Method Summary
Modifier and TypeMethodDescriptionbooleanallSubscriptionsHaveConsumersAssigned(pl.allegro.tech.hermes.api.Topic topic, List<pl.allegro.tech.hermes.api.Subscription> subscriptions) booleanareOffsetsAvailableOnAllKafkaTopics(pl.allegro.tech.hermes.api.Topic topic) voidcreateConsumerGroups(pl.allegro.tech.hermes.api.Topic topic, pl.allegro.tech.hermes.api.Subscription subscription) voiddeleteConsumerGroupForDatacenter(pl.allegro.tech.hermes.api.SubscriptionName subscriptionName, String datacenter) List<pl.allegro.tech.hermes.api.ConsumerGroup> describeConsumerGroups(pl.allegro.tech.hermes.api.Topic topic, String subscriptionName) fetchTopicOffsetsAt(pl.allegro.tech.hermes.api.Topic topic, Long timestamp) voidmanageTopic(Consumer<BrokerTopicManagement> manageFunction) voidmoveOffsets(pl.allegro.tech.hermes.api.Topic topic, String subscriptionName, Map<String, List<pl.allegro.tech.hermes.common.kafka.offset.PartitionOffset>> brokerPartitionOffsets) voidmoveOffsetsForActiveConsumers(pl.allegro.tech.hermes.api.Topic topic, String subscriptionName, Map<String, List<pl.allegro.tech.hermes.common.kafka.offset.PartitionOffset>> brokerPartitionOffsets, RequestUser requester) readMessageFromPrimary(String clusterName, pl.allegro.tech.hermes.api.Topic topic, Integer partition, Long offset) voidremoveTopicByName(String topicName) booleantopicExists(pl.allegro.tech.hermes.api.Topic topic)
-
Constructor Details
-
MultiDCAwareService
public MultiDCAwareService(List<BrokersClusterService> clusters, Clock clock, Duration intervalBetweenCheckingIfOffsetsMoved, Duration offsetsMovedTimeout, MultiDatacenterRepositoryCommandExecutor multiDcExecutor)
-
-
Method Details
-
manageTopic
-
readMessageFromPrimary
-
fetchTopicOffsetsAt
public MultiDCOffsetChangeSummary fetchTopicOffsetsAt(pl.allegro.tech.hermes.api.Topic topic, Long timestamp) -
moveOffsets
-
moveOffsetsForActiveConsumers
public void moveOffsetsForActiveConsumers(pl.allegro.tech.hermes.api.Topic topic, String subscriptionName, Map<String, List<pl.allegro.tech.hermes.common.kafka.offset.PartitionOffset>> brokerPartitionOffsets, RequestUser requester) -
areOffsetsAvailableOnAllKafkaTopics
public boolean areOffsetsAvailableOnAllKafkaTopics(pl.allegro.tech.hermes.api.Topic topic) -
topicExists
public boolean topicExists(pl.allegro.tech.hermes.api.Topic topic) -
listTopicFromAllDC
-
removeTopicByName
-
createConsumerGroups
public void createConsumerGroups(pl.allegro.tech.hermes.api.Topic topic, pl.allegro.tech.hermes.api.Subscription subscription) -
allSubscriptionsHaveConsumersAssigned
public boolean allSubscriptionsHaveConsumersAssigned(pl.allegro.tech.hermes.api.Topic topic, List<pl.allegro.tech.hermes.api.Subscription> subscriptions) -
describeConsumerGroups
-
deleteConsumerGroupForDatacenter
public void deleteConsumerGroupForDatacenter(pl.allegro.tech.hermes.api.SubscriptionName subscriptionName, String datacenter)
-