Package org.apache.kafka.connect.mirror
Class DefaultReplicationPolicy
java.lang.Object
org.apache.kafka.connect.mirror.DefaultReplicationPolicy
- All Implemented Interfaces:
Configurable
,ReplicationPolicy
- Direct Known Subclasses:
IdentityReplicationPolicy
Defines remote topics like "us-west.topic1". The separator is customizable and defaults to a period.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncheckpointsTopic
(String clusterAlias) Returns the name checkpoint topic for given cluster alias.void
Configure this class with the given key-value pairsformatRemoteTopic
(String sourceClusterAlias, String topic) How to rename remote topics; generally should be like us-west.topic1.boolean
isCheckpointsTopic
(String topic) check if topic is a checkpoint topic.boolean
isMM2InternalTopic
(String topic) Check topic is one of MM2 internal topic, this is used to make sure the topic doesn't need to be replicated.offsetSyncsTopic
(String clusterAlias) Returns the offset-syncs topic for given cluster alias.topicSource
(String topic) Source cluster alias of given remote topic, e.g.upstreamTopic
(String topic) Name of topic on the source cluster, e.g.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.kafka.connect.mirror.ReplicationPolicy
heartbeatsTopic, isHeartbeatsTopic, isInternalTopic, originalTopic
-
Field Details
-
SEPARATOR_CONFIG
- See Also:
-
SEPARATOR_DEFAULT
- See Also:
-
INTERNAL_TOPIC_SEPARATOR_ENABLED_CONFIG
- See Also:
-
INTERNAL_TOPIC_SEPARATOR_ENABLED_DEFAULT
-
-
Constructor Details
-
DefaultReplicationPolicy
public DefaultReplicationPolicy()
-
-
Method Details
-
configure
Description copied from interface:Configurable
Configure this class with the given key-value pairs- Specified by:
configure
in interfaceConfigurable
-
formatRemoteTopic
Description copied from interface:ReplicationPolicy
How to rename remote topics; generally should be like us-west.topic1.- Specified by:
formatRemoteTopic
in interfaceReplicationPolicy
-
topicSource
Description copied from interface:ReplicationPolicy
Source cluster alias of given remote topic, e.g. "us-west" for "us-west.topic1". Returns null if not a remote topic.- Specified by:
topicSource
in interfaceReplicationPolicy
-
upstreamTopic
Description copied from interface:ReplicationPolicy
Name of topic on the source cluster, e.g. "topic1" for "us-west.topic1".Topics may be replicated multiple hops, so the immediately upstream topic may itself be a remote topic.
Returns null if not a remote topic.
- Specified by:
upstreamTopic
in interfaceReplicationPolicy
-
offsetSyncsTopic
Description copied from interface:ReplicationPolicy
Returns the offset-syncs topic for given cluster alias.- Specified by:
offsetSyncsTopic
in interfaceReplicationPolicy
-
checkpointsTopic
Description copied from interface:ReplicationPolicy
Returns the name checkpoint topic for given cluster alias.- Specified by:
checkpointsTopic
in interfaceReplicationPolicy
-
isCheckpointsTopic
Description copied from interface:ReplicationPolicy
check if topic is a checkpoint topic.- Specified by:
isCheckpointsTopic
in interfaceReplicationPolicy
-
isMM2InternalTopic
Description copied from interface:ReplicationPolicy
Check topic is one of MM2 internal topic, this is used to make sure the topic doesn't need to be replicated.- Specified by:
isMM2InternalTopic
in interfaceReplicationPolicy
-