Package org.apache.kafka.connect.mirror
Interface ReplicationPolicy
- All Known Implementing Classes:
DefaultReplicationPolicy
,IdentityReplicationPolicy
An interface used by the MirrorMaker connectors to manage topics names between source and target clusters.
-
Method Summary
Modifier and TypeMethodDescriptiondefault String
checkpointsTopic
(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 String
Returns the name of heartbeats topic.default boolean
isCheckpointsTopic
(String topic) Returns true if the topic is a checkpoints topic.default boolean
isHeartbeatsTopic
(String topic) Returns true if the topic is a heartbeats topicdefault boolean
isInternalTopic
(String topic) Returns true if the topic is considered an internal topic.default boolean
isMM2InternalTopic
(String topic) Returns true if the topic is one of MirrorMaker internal topics.default String
offsetSyncsTopic
(String clusterAlias) Returns the name of the offset-syncs topic for given cluster alias.default String
originalTopic
(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.
-