code: public Message listen(String destName, String messageSelector) throws MessagingException {
          if(logger.isDebugEnabled()) {
              logger.debug("listen() - Synchronous listen on destination " + destName);
          }
  
          JMSDestination jmsDest = getJMSDestination(destName);
  
          // Setup the consumer and block until a
          // message arrives for this destination
          //
          return setupSynchConsumer(jmsDest, messageSelector, 0);
      }
docs: This is a synchronous listen. The caller will block until a message is
  received for the given destination.
  Messages will be filtered based on the provided message selector.
  
  @param destName
  the Destination to listen on
  @param messageSelector
  selection criteria for filtering messages
  @return the Message received for the given Destination
  @throws MessagingException