code: protected void processReceivedMessages(List<Message> messages) {
          List<String> nackMessages = new ArrayList<String>();
          List<MessageManager> messageManagers = new ArrayList<MessageManager>();
          for (Message message : messages) {
              try {
                  javax.jms.Message jmsMessage = convertToJMSMessage(message);
                  messageManagers.add(new MessageManager(this, jmsMessage));
              } catch (JMSException e) {
                  nackMessages.add(message.getReceiptHandle());
              }
          }
          
          synchronized (stateLock) {
              if (messageListener != null) {
                  sqsSessionRunnable.scheduleCallBacks(messageListener, messageManagers);
              } else {
                  messageQueue.addAll(messageManagers);
              }
              
              messagesPrefetched += messageManagers.size();
              notifyStateChange();
          }
  
          // Nack any messages that cannot be serialized to JMSMessage.
          try {
              negativeAcknowledger.action(queueUrl, nackMessages);
          } catch (JMSException e) {
              LOG.warn("Caught exception while nacking received messages", e);
          }
      }
docs: Converts the received message to JMS message, and pushes to messages to
  either callback scheduler for asynchronous message delivery or to
  internal buffers for synchronous message delivery. Messages that was not
  converted to JMS message will be immediately negative acknowledged.