public static PulsarMessageInfo getMessageFromHttpResponse(ResponseEntity<byte[]> response, String topic)
            throws Exception {
        List<PulsarMessageInfo> messages = PulsarUtils.getMessagesFromHttpResponse(response, topic);
        if (messages.size() > 0) {
            return messages.get(0);
        } else {
            return null;
        }
    }
Examine a specific message on a topic by position relative to the earliest or the latest message.

@param restTemplate spring framework RestTemplate
@param clusterInfo pulsar cluster info
@param topicPartition pulsar topic partition info
@param messageType pulsar message type info
@param messagePosition pulsar message position info
@return spring framework HttpEntity
@throws Exception any exception if occurred
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/resource/queue/pulsar/PulsarUtils.java