@Override
        public void onTimeout(final String nodeId, TimeoutInfo nodeInfo) {
            Integer lid = null;
            StringBuilder strBuffer = new StringBuilder(512);
            try {
                lid =
                        brokerRowLock.getLock(null, StringUtils.getBytesUtf8(nodeInfo.getSecondKey()), true);
                Integer partLock = null;
                try {
                    partLock =
                            brokerRowLock.getLock(null, StringUtils.getBytesUtf8(nodeInfo.getThirdKey()), true);
                    ConsumerNodeInfo consumerNodeInfo =
                            consumerRegisterMap.get(nodeInfo.getThirdKey());
                    if (consumerNodeInfo == null) {
                        return;
                    }
                    if (consumerNodeInfo.getConsumerId().equalsIgnoreCase(nodeInfo.getSecondKey())) {
                        if (consumerRegisterMap.remove(nodeInfo.getThirdKey()) != null) {
                            BrokerSrvStatsHolder.decConsumeOnlineCnt(true);
                        }
                        String[] groupTopicPart =
                                consumerNodeInfo.getPartStr().split(TokenConstants.ATTR_SEP);
                        long updatedOffset =
                                offsetManager.commitOffset(groupTopicPart[0],
                                        groupTopicPart[1], Integer.parseInt(groupTopicPart[2]), false);
                        logger.info(strBuffer.append("[Consumer-Partition Timeout]")
                                .append(nodeId).append(",updatedOffset=")
                                .append(updatedOffset).toString());
                    }
                } catch (IOException e1) {
                    logger.warn("Failed to lock.", e1);
                } finally {
                    if (partLock != null) {
                        brokerRowLock.releaseRowLock(partLock);
                    }
                }
            } catch (IOException e2) {
                logger.warn("Failed to lock.", e2);
            } finally {
                if (lid != null) {
                    brokerRowLock.releaseRowLock(lid);
                }
            }
        }
Consumer timeout handler. Update consumer's info if exists consumer timeout.
inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/broker/BrokerServiceServer.java