public class IdentityReplicationPolicy extends DefaultReplicationPolicy
N.B. MirrorMaker is not able to prevent cycles when using this class, so take care that your replication topology is acyclic. If migrating from MirrorMaker v1, this will likely already be the case.
Modifier and Type | Field and Description |
---|---|
static String |
SOURCE_CLUSTER_ALIAS_CONFIG |
INTERNAL_TOPIC_SEPARATOR_ENABLED_CONFIG, INTERNAL_TOPIC_SEPARATOR_ENABLED_DEFAULT, SEPARATOR_CONFIG, SEPARATOR_DEFAULT
Constructor and Description |
---|
IdentityReplicationPolicy() |
Modifier and Type | Method and Description |
---|---|
void |
configure(Map<String,?> props)
Configure this class with the given key-value pairs
|
String |
formatRemoteTopic(String sourceClusterAlias,
String topic)
Unlike DefaultReplicationPolicy, IdentityReplicationPolicy does not include the source
cluster alias in the remote topic name.
|
String |
topicSource(String topic)
Unlike DefaultReplicationPolicy, IdentityReplicationPolicy cannot know the source of
a remote topic based on its name alone.
|
String |
upstreamTopic(String topic)
Since any topic may be a "remote topic", this just returns `topic`.
|
checkpointsTopic, isCheckpointsTopic, isMM2InternalTopic, offsetSyncsTopic
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
heartbeatsTopic, isHeartbeatsTopic, isInternalTopic, originalTopic
public static final String SOURCE_CLUSTER_ALIAS_CONFIG
public void configure(Map<String,?> props)
Configurable
configure
in interface Configurable
configure
in class DefaultReplicationPolicy
public String formatRemoteTopic(String sourceClusterAlias, String topic)
In the special case of heartbeats, we defer to DefaultReplicationPolicy.
formatRemoteTopic
in interface ReplicationPolicy
formatRemoteTopic
in class DefaultReplicationPolicy
public String topicSource(String topic)
In the special case of heartbeats, we defer to DefaultReplicationPolicy.
topicSource
in interface ReplicationPolicy
topicSource
in class DefaultReplicationPolicy
public String upstreamTopic(String topic)
In the special case of heartbeats, we defer to DefaultReplicationPolicy.
upstreamTopic
in interface ReplicationPolicy
upstreamTopic
in class DefaultReplicationPolicy