private boolean validAndStoreConsumeTarget(Map<String, TreeSet<String>> consumeTargetMap,
            StringBuilder sBuffer, ProcessResult result) {
        if (consumeTargetMap == null
                || consumeTargetMap.isEmpty()) {
            result.setFailResult(TErrCodeConstants.BAD_REQUEST,
                    "Parameter error: the subscribed target is null or empty!");
            return result.isSuccess();
        }
        String topicName;
        String tmpFilter;
        TreeSet<String> filterCondSet;
        TreeSet<String> newFilterCondSet;
        Map<String, TreeSet<String>> newConsumeTargetMap = new HashMap<>();
        for (Map.Entry<String, TreeSet<String>> entry : consumeTargetMap.entrySet()) {
            // check topic value
            topicName = entry.getKey();
            if (TStringUtils.isBlank(topicName)) {
                result.setFailResult(TErrCodeConstants.BAD_REQUEST,
                        "Parameter error: an blank Topic field,topic is blank in map!");
                return result.isSuccess();
            }
            topicName = topicName.trim();
            if (topicName.length() > TBaseConstants.META_MAX_TOPICNAME_LENGTH) {
                result.setFailResult(TErrCodeConstants.BAD_REQUEST,
                        sBuffer.append("Parameter error: the max length of ")
                                .append(topicName).append(" in topicName parameter over ")
                                .append(TBaseConstants.META_MAX_TOPICNAME_LENGTH)
                                .append(" characters").toString());
                sBuffer.delete(0, sBuffer.length());
                return result.isSuccess();
            }
            // check topic's filter condition value
            filterCondSet = entry.getValue();
            newFilterCondSet = new TreeSet<>();
            if ((filterCondSet != null) && (!filterCondSet.isEmpty())) {
                if (filterCondSet.size() > TBaseConstants.CFG_FLT_MAX_FILTER_ITEM_COUNT) {
                    result.setFailResult(TErrCodeConstants.BAD_REQUEST,
                            sBuffer.append("Parameter error: over max allowed filter count of ")
                                    .append(topicName).append(", allowed count is ")
                                    .append(TBaseConstants.CFG_FLT_MAX_FILTER_ITEM_COUNT)
                                    .toString());
                    sBuffer.delete(0, sBuffer.length());
                    return result.isSuccess();
                }
                for (String filter : filterCondSet) {
                    if (TStringUtils.isBlank(filter)) {
                        result.setFailResult(TErrCodeConstants.BAD_REQUEST,
                                sBuffer.append("Parameter error: include blank filter value of ")
                                        .append(topicName).toString());
                        sBuffer.delete(0, sBuffer.length());
                        return result.isSuccess();
                    }
                    tmpFilter = filter.trim();
                    if (tmpFilter.length() > TBaseConstants.CFG_FLT_MAX_FILTER_ITEM_LENGTH) {
                        result.setFailResult(TErrCodeConstants.BAD_REQUEST,
                                sBuffer.append("Parameter error: over max allowed filter length, ")
                                        .append(tmpFilter).append(" in ").append(topicName)
                                        .append(", allowed length is ")
                                        .append(TBaseConstants.CFG_FLT_MAX_FILTER_ITEM_LENGTH)
                                        .toString());
                        sBuffer.delete(0, sBuffer.length());
                        return result.isSuccess();
                    }
                    newFilterCondSet.add(tmpFilter);
                }
            }
            newConsumeTargetMap.put(topicName, newFilterCondSet);
        }
        result.setSuccResult(newConsumeTargetMap);
        return true;
    }
Start heartbeat thread threads.

@param result  process result
@param sBuffer  string buffer

@return  process result
inlong-tubemq/tubemq-client/src/main/java/org/apache/inlong/tubemq/client/consumer/SimpleClientBalanceConsumer.java