Interface ReplicationPolicy

  • All Known Implementing Classes:
    DefaultReplicationPolicy

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

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

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