public List<Message> receiveSelectedBatch(String messageSelector, int batchSize) throws JmsException {
        Destination defaultDestination = getDefaultDestination();
        if (defaultDestination != null) {
            return receiveSelectedBatch(defaultDestination, messageSelector, batchSize);
        } else {
            return receiveSelectedBatch(getRequiredDefaultDestinationName(), messageSelector, batchSize);
        }
    }
public List < Message > receiveSelectedBatch ( String messageSelector , int batchSize ) throws JmsException { Destination defaultDestination = getDefaultDestination ( ) ; if ( defaultDestination != null ) { return receiveSelectedBatch ( defaultDestination , messageSelector , batchSize ) ; } else { return receiveSelectedBatch ( getRequiredDefaultDestinationName ( ) , messageSelector , batchSize ) ; } }
Receive a batch of up to batchSize for default destination and given message selector. Other than batching this method is the same as {@link JmsTemplate#receiveSelected(String)}
@return A list of {@link Message}
@param messageSelector The Selector
@param batchSize The batch size
@throws JmsException The {@link JmsException}