public boolean isTopicExist(String masterUrl, String topicName) {
        LOGGER.info("begin to check if the TubeMQ topic {} exists", topicName);
        String url = masterUrl + QUERY_TOPIC_PATH + TOPIC_NAME + topicName;
        try {
            TopicResponse topicView = HttpUtils.request(restTemplate, url, HttpMethod.GET,
                    null, new HttpHeaders(), TopicResponse.class);
            if (CollectionUtils.isEmpty(topicView.getData())) {
                LOGGER.warn("TubeMQ topic {} not exists in {}", topicName, url);
                return false;
            }
            LOGGER.info("TubeMQ topic {} exists in {}", topicName, url);
            return true;
        } catch (Exception e) {
            String msg = String.format("failed to check if the topic %s exist in ", topicName);
            LOGGER.error(msg + url, e);
            throw new BusinessException(msg + masterUrl + ", error: " + e.getMessage());
        }
    }
Check if the topic is exists in the TubeMQ.
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/resource/queue/tubemq/TubeMQOperator.java