Package org.apache.kafka.connect.mirror
Interface ReplicationPolicy
- All Known Implementing Classes:
DefaultReplicationPolicy,IdentityReplicationPolicy
public interface ReplicationPolicy
An interface used by the MirrorMaker connectors to manage topics names between source and target clusters.
-
Method Summary
Modifier and TypeMethodDescriptiondefault StringcheckpointsTopic(String clusterAlias) Returns the name of the checkpoints topic for given cluster alias.formatRemoteTopic(String sourceClusterAlias, String topic) Returns the remote topic name for the given topic and source cluster alias.default StringReturns the name of heartbeats topic.default booleanisCheckpointsTopic(String topic) Returns true if the topic is a checkpoints topic.default booleanisHeartbeatsTopic(String topic) Returns true if the topic is a heartbeats topicdefault booleanisInternalTopic(String topic) Returns true if the topic is considered an internal topic.default booleanisMM2InternalTopic(String topic) Returns true if the topic is one of MirrorMaker internal topics.default StringoffsetSyncsTopic(String clusterAlias) Returns the name of the offset-syncs topic for given cluster alias.default StringoriginalTopic(String topic) Returns the name of the original topic, which may have been replicated multiple hops.topicSource(String topic) Returns the source cluster alias of given topic.upstreamTopic(String topic) Return the name of the given topic on the source cluster.
-
Method Details
-
formatRemoteTopic
Returns the remote topic name for the given topic and source cluster alias. -
topicSource
Returns the source cluster alias of given topic. Returns null if the given topic is not a remote topic. -
upstreamTopic
Return the name of the given topic on the source cluster.Topics may be replicated multiple hops, so the immediately upstream topic may itself be a remote topic.
Returns null if the given topic is not a remote topic.
-
originalTopic
Returns the name of the original topic, which may have been replicated multiple hops. Returns the topic if it is not a remote topic. -
heartbeatsTopic
Returns the name of heartbeats topic. -
offsetSyncsTopic
Returns the name of the offset-syncs topic for given cluster alias. -
checkpointsTopic
Returns the name of the checkpoints topic for given cluster alias. -
isHeartbeatsTopic
Returns true if the topic is a heartbeats topic -
isCheckpointsTopic
Returns true if the topic is a checkpoints topic. -
isMM2InternalTopic
Returns true if the topic is one of MirrorMaker internal topics. This is used to make sure the topic doesn't need to be replicated. -
isInternalTopic
Returns true if the topic is considered an internal topic.
-