List<Message> receiveMessages() {
        try {
            ReceiveMessageRequest receiveMessageRequest =
                    new ReceiveMessageRequest()
                            .withQueueUrl(queueURL)
                            .withVisibilityTimeout(visibilityTimeoutInSeconds)
                            .withMaxNumberOfMessages(batchSize);

            ReceiveMessageResult result = client.receiveMessage(receiveMessageRequest);

            List<Message> messages =
                    result.getMessages().stream()
                            .map(
                                    msg ->
                                            new Message(
                                                    msg.getMessageId(),
                                                    msg.getBody(),
                                                    msg.getReceiptHandle()))
                            .collect(Collectors.toList());
            Monitors.recordEventQueueMessagesProcessed(QUEUE_TYPE, this.queueName, messages.size());
            return messages;
        } catch (Exception e) {
            LOGGER.error("Exception while getting messages from SQS", e);
            Monitors.recordObservableQMessageReceivedErrors(QUEUE_TYPE);
        }
        return new ArrayList<>();
    }
@param visibilityTimeout Visibility timeout for the message in SECONDS
@return builder instance
awssqs-event-queue/src/main/java/com/netflix/conductor/sqs/eventqueue/SQSObservableQueue.java