code: private Message doReceive(MessageConsumer consumer, long timeout) throws JMSException {
  
          if (timeout == RECEIVE_TIMEOUT_NO_WAIT) {
              return consumer.receiveNoWait();
          } else if (timeout > 0) {
              return consumer.receive(timeout);
          } else {
              return consumer.receive();
          }
      }
docs: Method replicates the simple logic from JmsTemplate#doReceive(MessageConsumer, long) which is private and therefore cannot be accessed from this class
  @param consumer The consumer to use
  @param timeout The timeout to apply
  @return A Message
  @throws JMSException Indicates an error occurred