public boolean addConsumer(ConsumerInfo inConsumer,
            StringBuilder strBuff, ProcessResult result) {
        try {
            csmInfoRWLock.writeLock().lock();
            if (this.consumerInfoMap.isEmpty()) {
                if (this.consumeType == ConsumeType.CONSUME_BAND) {
                    this.sessionKey = inConsumer.getSessionKey();
                    this.sessionTime = inConsumer.getStartTime();
                    this.sourceCount = inConsumer.getSourceCount();
                    this.isSelectedBig = inConsumer.isSelectedBig();
                    this.curCheckCycle.set(0);
                } else if (this.consumeType == ConsumeType.CONSUME_CLIENT_REB) {
                    this.sourceCount = inConsumer.getSourceCount();
                }
            } else {
                if (!validConsumerInfo(inConsumer, strBuff, result)) {
                    return false;
                }
                ConsumerInfo curConsumerInfo =
                        consumerInfoMap.get(inConsumer.getConsumerId());
                if (curConsumerInfo != null) {
                    curConsumerInfo.updCurConsumerInfo(inConsumer);
                    result.setSuccResult(false);
                    return true;
                }
            }
            this.consumerInfoMap.put(inConsumer.getConsumerId(), inConsumer);
            if (consumeType == ConsumeType.CONSUME_BAND) {
                bookPartitionInfo(inConsumer);
            }
            result.setSuccResult(true);
            return true;
        } finally {
            csmInfoRWLock.writeLock().unlock();
        }
    }
Add consumer to consume group

@param inConsumer consumer object
@param strBuff    the string buffer
@param result     the process result
@return           whether the addition is successful
inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/master/nodemanage/nodeconsumer/ConsumeGroupInfo.java