code: public List<Message> receiveSelectedBatch(final String destinationName, final String messageSelector,
              final int batchSize) throws JmsException {
          return execute(new SessionCallback<List<Message>>() {
              public List<Message> doInJms(Session session) throws JMSException {
                  Destination destination = resolveDestinationName(session, destinationName);
                  return doBatchReceive(session, destination, messageSelector, batchSize);
              }
          }, true);
      }
docs: Receive a batch of up to batchSize for given destination name and message selector. Other than batching this method is the same as {@link JmsTemplate#receiveSelected(String, String)}
  @return A list of {@link Message}
  @param destinationName The destination name
  @param messageSelector The Selector
  @param batchSize The batch size
  @throws JmsException The {@link JmsException}