public boolean createTopic(NewTopic topic) {
        if (topic == null) return false;
        Set<String> newTopicNames = createTopics(topic);
        return newTopicNames.contains(topic.name());
    }
Attempt to create the topic described by the given definition, returning true if the topic was created or false
if the topic already existed.

@param topic the specification of the topic
@return true if the topic was created or false if the topic already existed.
@throws ConnectException            if an error occurs, the operation takes too long, or the thread is interrupted while
                                    attempting to perform this operation
@throws UnsupportedVersionException if the broker does not support the necessary APIs to perform this request
connect/runtime/src/main/java/org/apache/kafka/connect/util/TopicAdmin.java