private boolean registerPartitions(Partition partition, long boostrapOffset,
            ProcessResult result, StringBuilder sBuffer) {
        int maxRegisterRetryTimes = 2;
        int retryTimesRegister2Broker = 0;
        while (retryTimesRegister2Broker < maxRegisterRetryTimes) {
            if (isShutdown()) {
                result.setFailResult(TErrCodeConstants.CLIENT_SHUTDOWN,
                        "The client is not started or closed!");
                return result.isSuccess();
            }
            if (clientRmtDataCache.isPartitionInUse(partition.getPartitionKey())) {
                result.setSuccResult();
                return result.isSuccess();
            }
            if (tryRegister2Broker(partition, boostrapOffset, result, sBuffer)) {
                return result.isSuccess();
            }
            logger.warn(sBuffer.append("register ")
                    .append(partition.toString()).append(" failure(")
                    .append(retryTimesRegister2Broker).append("), return ")
                    .append(result.getErrMsg()).toString());
            retryTimesRegister2Broker++;
            ThreadUtils.sleep(1000);
        }
        return result.isSuccess();
    }
Register partitions.

@param partition need register partition
@param boostrapOffset boostrap offset
@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