Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejava
titleReplicationPolicy.java
public interface ReplicationPolicy {
    ...

    default boolean isMM2InternalTopic(String topic) {
        // With this change, we only consider a topic to be mm2 internal if it
        // 1. starts with "mm2" and ends wit "internal", or
        // 2. it is a checkpoint topic (as by default, it ends with ".checkpoints.internal", but can be overwritten by implementing classes)
        return  topic.startsWith("mm2") && topic.endsWith(".internal")  || isCheckpointsTopic(topic);
    }

    default boolean isInternalTopic(String topic) {
        boolean isKafkaInternalTopic = topic.startsWith("__") || topic.startsWith(".");
        return isMM2InternalTopic(topic) || isKafkaInternalTopic;
    }

}

...