@Override
    public boolean getPartitionMetaInfo(QueryMetaResult result) throws TubeClientException {
        if (result == null) {
            throw new TubeClientException("Illegal parameter: parameter result is null!");
        }
        StringBuilder sBuffer = new StringBuilder(512);
        if (isShutdown()) {
            result.setFailResult(TErrCodeConstants.CLIENT_SHUTDOWN,
                    "The client is not started or closed!");
            return result.isSuccess();
        }
        if (System.currentTimeMillis() - lstMetaQueryTime.get() >= consumerConfig.getPartMetaInfoCheckPeriodMs()) {
            if (metaReqStatusId.compareAndSet(0, 1)) {
                try {
                    ClientMaster.GetPartMetaResponseM2C response =
                            masterService.consumerGetPartMetaInfoC2M(createMasterGetPartMetaRequest(),
                                    AddressUtils.getLocalAddress(), consumerConfig.isTlsEnable());
                    if (response == null) {
                        result.setFailResult(TErrCodeConstants.CONNECT_RETURN_NULL,
                                sBuffer.append("Query Failed: ").append(consumerId)
                                        .append(" query master and return null!").toString());
                        sBuffer.delete(0, sBuffer.length());
                        return result.isSuccess();
                    }
                    needMetaSelfChk.set(false);
                    lstMetaQueryTime.set(System.currentTimeMillis());
                    if (response.getErrCode() != TErrCodeConstants.SUCCESS) {
                        // If the consumer group is forbidden, output the log
                        result.setFailResult(response.getErrCode(), response.getErrMsg());
                        return result.isSuccess();
                    }
                    // Process the successful response
                    if (response.hasBrokerConfigId()) {
                        clientRmtDataCache.updateBrokerInfoList(response.getBrokerConfigId(),
                                response.getBrokerConfigListList(), sBuffer);
                    }
                    if (response.hasTopicMetaInfoId()) {
                        // update local cache meta information
                        clientRmtDataCache.storeTopicMetaInfo(response.getTopicMetaInfoId(),
                                response.getTopicMetaInfoListList());
                        // clear unsubscribable partitions
                        clearUnSubscribablePartitions();
                    }
                } catch (Throwable e) {
                    result.setFailResult(TErrCodeConstants.INTERNAL_SERVER_ERROR,
                            sBuffer.append("Query MetaInfo throw exception: ")
                                    .append(e.getCause()).toString());
                    sBuffer.delete(0, sBuffer.length());
                    return result.isSuccess();
                } finally {
                    metaReqStatusId.set(0);
                }
            }
        }
        result.setSuccResult(clientRmtDataCache.getConfPartMetaInfo());
        return result.isSuccess();
    }
Initial a client-balance consumer object
@param messageSessionFactory   the session factory
@param consumerConfig          the consumer configure
@throws TubeClientException    the exception while creating object.
inlong-tubemq/tubemq-client/src/main/java/org/apache/inlong/tubemq/client/consumer/SimpleClientBalanceConsumer.java