@Override
    public List<BriefMQMessage> listMessages(QueryMessageRequest request, String operator) {
        InlongGroupEntity groupEntity = groupMapper.selectByGroupId(request.getGroupId());
        if (groupEntity == null) {
            throw new BusinessException(
                    String.format("InlongGroup does not exist with InlongGroupId=%s", request.getGroupId()));
        }
        userService.checkUser(groupEntity.getInCharges(), operator, String
                .format("Current user does not have permission to query message for groupId=%s", request.getGroupId()));
        InlongGroupOperator instance = groupOperatorFactory.getInstance(groupEntity.getMqType());
        InlongGroupInfo groupInfo = instance.getFromEntity(groupEntity);
        InlongStreamInfo inlongStreamInfo = get(request.getGroupId(), request.getStreamId());
        List<BriefMQMessage> messageList = new ArrayList<>();
        QueueResourceOperator queueOperator = queueOperatorFactory.getInstance(groupEntity.getMqType());
        try {
            messageList = queueOperator.queryLatestMessages(groupInfo, inlongStreamInfo, request);
        } catch (Exception e) {
            LOGGER.error("query message error ", e);
        }
        return messageList;
    }
Check whether the inlong group status is temporary

@param groupId inlong group id
@return inlong group entity
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/stream/InlongStreamServiceImpl.java