@Override
    public long getTmpOffset(final String group, final String topic, int partitionId) {
        String offsetCacheKey = OffsetStgInfo.buildOffsetKey(topic, partitionId);
        ConcurrentHashMap<String, Long> partTmpOffsetMap = tmpOffsetMap.get(group);
        if (partTmpOffsetMap != null) {
            Long tmpOffset = partTmpOffsetMap.get(offsetCacheKey);
            if (tmpOffset == null) {
                return 0;
            } else {
                return tmpOffset - tmpOffset % DataStoreUtils.STORE_INDEX_HEAD_LEN;
            }
        }
        return 0;
    }
Get temp offset.

@param group          the consume group name
@param topic          the consumed topic name
@param partitionId    the consumed partition id
@return               the inflight offset
inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/broker/offset/DefaultOffsetManager.java