Interface ReplicationPolicy

All Known Implementing Classes:
DefaultReplicationPolicy, IdentityReplicationPolicy

@Evolving public interface ReplicationPolicy
Defines which topics are "remote topics". e.g. "us-west.topic1".
  • Method Details

    • formatRemoteTopic

      String formatRemoteTopic(String sourceClusterAlias, String topic)
      How to rename remote topics; generally should be like us-west.topic1.
    • topicSource

      String topicSource(String topic)
      Source cluster alias of given remote topic, e.g. "us-west" for "us-west.topic1". Returns null if not a remote topic.
    • upstreamTopic

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

      default String originalTopic(String topic)
      The name of the original source-topic, which may have been replicated multiple hops. Returns the topic if it is not a remote topic.
    • heartbeatsTopic

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

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

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

      default boolean isHeartbeatsTopic(String topic)
      check if topic is a heartbeat topic, e.g heartbeats, us-west.heartbeats.
    • isCheckpointsTopic

      default boolean isCheckpointsTopic(String topic)
      check if topic is a checkpoint topic.
    • isMM2InternalTopic

      default 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.
    • isInternalTopic

      default boolean isInternalTopic(String topic)
      Internal topics are never replicated.