public void appendGroupOffsetInfo(Map<String, OffsetHistoryInfo> groupOffsetMap,
            int brokerAddrId, long storeTime, int retryCnt,
            long waitRetryMs, StringBuilder strBuff) {
        if (groupOffsetMap == null || groupOffsetMap.isEmpty()) {
            return;
        }
        int checkSum;
        int msgTypeCode;
        int partitionId;
        byte[] dataValue;
        byte[] attrData;
        ByteBuffer rcdBuff;
        byte[] msgData;
        int msgLength;
        int msgFlag = 1;
        String baseKey;
        MessageStore msgStore;
        AppendResult appendResult = new AppendResult();
        // get store time
        String sendTime = DateTimeConvertUtils.ms2yyyyMMddHHmm(storeTime);
        for (Map.Entry<String, OffsetHistoryInfo> entry : groupOffsetMap.entrySet()) {
            if (entry == null || entry.getKey() == null || entry.getValue() == null) {
                continue;
            }
            // build record info;
            msgTypeCode = entry.getKey().hashCode();
            partitionId = Math.abs(msgTypeCode) % TServerConstants.OFFSET_HISTORY_NUMPARTS;
            // get msg data
            entry.getValue().buildRecordInfo(strBuff, storeTime);
            dataValue = StringUtils.getBytesUtf8(strBuff.toString());
            strBuff.delete(0, strBuff.length());
            // get msg attributes
            strBuff.append(TokenConstants.TOKEN_MSG_TYPE)
                    .append(TokenConstants.EQ).append(msgTypeCode)
                    .append(TokenConstants.ARRAY_SEP)
                    .append(TokenConstants.TOKEN_MSG_TIME)
                    .append(TokenConstants.EQ).append(sendTime)
                    .append(TokenConstants.ARRAY_SEP)
                    .append(TServerConstants.TOKEN_OFFSET_GROUP)
                    .append(TokenConstants.EQ).append(entry.getKey());
            attrData = StringUtils.getBytesUtf8(strBuff.toString());
            strBuff.delete(0, strBuff.length());
            // build binary record
            rcdBuff = ByteBuffer.allocate(4 + attrData.length + dataValue.length);
            rcdBuff.putInt(attrData.length);
            rcdBuff.put(attrData);
            rcdBuff.put(dataValue);
            msgData = rcdBuff.array();
            // get msg length and check-sum
            msgLength = msgData.length;
            checkSum = CheckSum.crc32(msgData);
            // store record
            try {
                msgStore = storeManager.getOrCreateMessageStore(
                        TServerConstants.OFFSET_HISTORY_NAME, partitionId);
                if (msgStore.appendMsg2(appendResult, msgLength, checkSum, msgData,
                        msgTypeCode, msgFlag, partitionId, brokerAddrId, storeTime,
                        retryCnt, waitRetryMs)) {
                    baseKey = strBuff.append(TServerConstants.OFFSET_HISTORY_NAME)
                            .append("#").append(tubeConfig.getHostName())
                            .append("#").append(tubeConfig.getHostName())
                            .append("#").append(partitionId)
                            .append("#").append(sendTime).toString();
                    putCounterGroup.add(baseKey, 1L, msgLength);
                    AuditUtils.addProduceRecord(TServerConstants.OFFSET_HISTORY_NAME,
                            entry.getKey(), sendTime, 1, msgLength);
                    strBuff.delete(0, strBuff.length());
                } else {
                    logger.warn("Put history offset overflow !");
                }
            } catch (Throwable ex) {
                strBuff.delete(0, strBuff.length());
                logger.error("Put history offset failed ", ex);
            }
        }
    }
append group current offset to storage

@param groupOffsetMap group offset information
@param brokerAddrId broker Address id
@param storeTime store time
@param retryCnt  retry count
@param waitRetryMs  wait duration on overflow
@param strBuff    string buffer
inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/broker/BrokerServiceServer.java