Skip to content

Commit f1a050c

Browse files
authored
chore: remove log and add topic check method (#2086)
1 parent a605066 commit f1a050c

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

connect/mirror-client/src/main/java/org/apache/kafka/connect/mirror/AutoMQIdentityReplicationPolicy.java

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ public String offsetSyncsTopic(String clusterAlias) {
3333
if (offsetSyncsTopic == null) {
3434
return super.offsetSyncsTopic(clusterAlias);
3535
}
36-
log.info("Using offset syncs topic: {}", offsetSyncsTopic);
3736
return offsetSyncsTopic;
3837
}
3938

@@ -43,7 +42,6 @@ public String checkpointsTopic(String clusterAlias) {
4342
if (checkpointsTopic == null) {
4443
return super.checkpointsTopic(clusterAlias);
4544
}
46-
log.info("Using checkpoints topic: {}", checkpointsTopic);
4745
return checkpointsTopic;
4846
}
4947

@@ -53,7 +51,22 @@ public String heartbeatsTopic() {
5351
if (heartbeatsTopic == null) {
5452
return super.heartbeatsTopic();
5553
}
56-
log.info("Using heartbeats topic: {}", heartbeatsTopic);
5754
return heartbeatsTopic;
5855
}
56+
57+
@Override
58+
public boolean isCheckpointsTopic(String topic) {
59+
String checkpointsTopic = System.getenv(CHECKPOINTS_TOPIC_ENV_KEY);
60+
return super.isCheckpointsTopic(topic) || topic.equals(checkpointsTopic);
61+
}
62+
63+
@Override
64+
public boolean isHeartbeatsTopic(String topic) {
65+
return super.isHeartbeatsTopic(topic) || topic.equals(heartbeatsTopic());
66+
}
67+
68+
@Override
69+
public boolean isMM2InternalTopic(String topic) {
70+
return super.isMM2InternalTopic(topic) || isHeartbeatsTopic(topic) || isCheckpointsTopic(topic);
71+
}
5972
}

0 commit comments

Comments
 (0)