Interface ReplicationPolicy

All Known Implementing Classes:
DefaultReplicationPolicy, IdentityReplicationPolicy

@Evolving public interface ReplicationPolicy
An interface used by the MirrorMaker connectors to manage topics names between source and target clusters.
  • Method Details

    • formatRemoteTopic

      String formatRemoteTopic(String sourceClusterAlias, String topic)
      Returns the remote topic name for the given topic and source cluster alias.
    • topicSource

      String topicSource(String topic)
      Returns the source cluster alias of given topic. Returns null if the given topic is not a remote topic.
    • upstreamTopic

      String upstreamTopic(String topic)
      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

      default String originalTopic(String topic)
      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

      default String heartbeatsTopic()
      Returns the name of heartbeats topic.
    • offsetSyncsTopic

      default String offsetSyncsTopic(String clusterAlias)
      Returns the name of the offset-syncs topic for given cluster alias.
    • checkpointsTopic

      default String checkpointsTopic(String clusterAlias)
      Returns the name of the checkpoints topic for given cluster alias.
    • isHeartbeatsTopic

      default boolean isHeartbeatsTopic(String topic)
      Returns true if the topic is a heartbeats topic
    • isCheckpointsTopic

      default boolean isCheckpointsTopic(String topic)
      Returns true if the topic is a checkpoints topic.
    • isMM2InternalTopic

      default boolean isMM2InternalTopic(String topic)
      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

      default boolean isInternalTopic(String topic)
      Returns true if the topic is considered an internal topic.