@Override
    public Map<Integer, Long> queryGroupOffsetInfo(String group, String topic,
            Set<Integer> partitionIds) {
        StringBuilder strBuff = new StringBuilder(512);
        String basePath = strBuff.append(this.consumerZkDir).append("/")
                .append(group).append("/offsets/").append(topic).append("/")
                .append(brokerId).append(TokenConstants.HYPHEN).toString();
        strBuff.delete(0, strBuff.length());
        String offsetZkInfo;
        Map<Integer, Long> offsetMap = new HashMap<>(partitionIds.size());
        for (Integer partitionId : partitionIds) {
            String offsetNode = strBuff.append(basePath).append(partitionId).toString();
            strBuff.delete(0, strBuff.length());
            try {
                offsetZkInfo = ZKUtil.readDataMaybeNull(this.zkw, offsetNode);
                if (offsetZkInfo == null) {
                    offsetMap.put(partitionId, null);
                } else {
                    String[] offsetInfoStrs =
                            offsetZkInfo.split(TokenConstants.HYPHEN);
                    offsetMap.put(partitionId, Long.parseLong(offsetInfoStrs[1]));
                }
            } catch (Throwable e) {
                BrokerSrvStatsHolder.incZKExcCnt();
                offsetMap.put(partitionId, null);
            }
        }
        return offsetMap;
    }
Get offset stored in zookeeper, if not found or error, set null
<p/>

@return partitionId--offset map info
inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/broker/offset/offsetstorage/ZkOffsetStorage.java