code: public Message receiveMessage(String queueName, long timeout) {
          checkStarted();
          try(Session session = receiverSessionPool.getSession()){
              Queue queue = (Queue) jmsServer.lookup(QUEUE_NAMESPACE + queueName);
              try(MessageConsumer consumer = session.createConsumer(queue)) {
                  return consumer.receive(timeout);
              }
          } catch (Exception e) {
              throw new AsyncException("Could not get message", e);
          }
      }
docs: Receives a messafge from a queue asynchronously.If this queue also has listeners, then messages will be distributed across
  all consumers.
  
  @param queueName name of queue
  @param timeout timeout in millis.
  
  @return message if  found, null if not.