public boolean isTopicCreationRequired(String topic) {
        return isTopicCreationEnabled && !topicCache.contains(topic);
    }
Check whether topic creation may be required for a specific topic name.

@return true if topic creation is enabled and the topic name is not in the topic cache;
false otherwise
connect/runtime/src/main/java/org/apache/kafka/connect/util/TopicCreation.java