You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2021/12/22 18:55:24 UTC

[GitHub] [kafka] guozhangwang commented on pull request #11611: MINOR: prefix topics if internal config is set

guozhangwang commented on pull request #11611:
URL: https://github.com/apache/kafka/pull/11611#issuecomment-999794655


   Though this comment is not for AK, I'd have to raise to our attention: in ksql we have hard-coded rules to detect internal topics to be cleaned when terminating a query, which is like this today:
   
   ```
     private static boolean isInternalTopic(final String topicName, final String applicationId) {
       final boolean prefixMatches = topicName.startsWith(applicationId + "-");
       final boolean suffixMatches = topicName.endsWith(KsqlConstants.STREAMS_CHANGELOG_TOPIC_SUFFIX)
           || topicName.endsWith(KsqlConstants.STREAMS_REPARTITION_TOPIC_SUFFIX)
           || topicName.matches(KsqlConstants.STREAMS_JOIN_REGISTRATION_TOPIC_PATTERN)
           || topicName.matches(KsqlConstants.STREAMS_JOIN_RESPONSE_TOPIC_PATTERN);
       return prefixMatches && suffixMatches;
     }
   ```
   
   With this change we have to remember updating this function otherwise the cleanup logic would break.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org