public Map<String, String> getAcceptPubPartInfo(Map<String, Integer> topicSizeMap,
            Set<Integer> enablePubBrokerIdSet) {
        TopicInfo topicInfo;
        ConcurrentHashMap<Integer, TopicInfo> topicInfoView;
        Map<String, String> topicPartStrMap = new HashMap<>();
        Map<String, StringBuilder> topicPartBufferMap = new HashMap<>();
        if (topicSizeMap == null || topicSizeMap.isEmpty()) {
            return topicPartStrMap;
        }
        // build topic-partition information
        StringBuilder tmpValue;
        StringBuilder confValue;
        for (String topic : topicSizeMap.keySet()) {
            topicInfoView = topicConfInfoMap.get(topic);
            if (topicInfoView == null
                    || topicInfoView.isEmpty()) {
                continue;
            }
            for (Map.Entry<Integer, TopicInfo> entry : topicInfoView.entrySet()) {
                if (entry.getKey() == null
                        || entry.getValue() == null
                        || !enablePubBrokerIdSet.contains(entry.getKey())) {
                    continue;
                }
                topicInfo = entry.getValue();
                if (topicInfo.isAcceptPublish()) {
                    confValue = topicPartBufferMap.get(topic);
                    if (confValue == null) {
                        tmpValue = new StringBuilder(512).append(topic)
                                .append(TokenConstants.SEGMENT_SEP)
                                .append(topicInfo.getSimpleValue());
                        topicPartBufferMap.put(topic, tmpValue);
                    } else {
                        confValue.append(TokenConstants.ARRAY_SEP)
                                .append(topicInfo.getSimpleValue());
                    }
                }
            }
        }
        // append max message size information
        Integer maxMsgSize;
        for (Map.Entry<String, StringBuilder> entry : topicPartBufferMap.entrySet()) {
            if (entry.getValue() == null) {
                continue;
            }
            confValue = topicPartBufferMap.get(entry.getKey());
            maxMsgSize = topicSizeMap.get(entry.getKey());
            if (maxMsgSize == null) {
                topicPartStrMap.put(entry.getKey(),
                        confValue.append(TokenConstants.SEGMENT_SEP).toString());
            } else {
                topicPartStrMap.put(entry.getKey(),
                        confValue.append(TokenConstants.SEGMENT_SEP).append(maxMsgSize).toString());
            }
        }
        topicPartBufferMap.clear();
        return topicPartStrMap;
    }
Gets the string map of topic partitions whose publish status is enabled

@param topicSizeMap need query topic and maxsize map
@param enablePubBrokerIdSet  need filtered broker id set
@return  query result
inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/master/nodemanage/nodebroker/BrokerTopicInfoView.java