code: private void createDestinations() throws MessagingException {
          try {
              // Create Destinations based on properties
              Enumeration<?> propertyNames = m_connectionProperties.keys();
              while (propertyNames.hasMoreElements()) {
                  String propertyName = (String) propertyNames.nextElement();
                  if (propertyName.startsWith("topic.")) {
                      String destinationName =
                              m_connectionProperties.getProperty(propertyName);
                      m_jmsManager.createDestination(destinationName,
                                                     DestinationType.Topic);
                  } else if (propertyName.startsWith("queue.")) {
                      String destinationName =
                              m_connectionProperties.getProperty(propertyName);
                      m_jmsManager.createDestination(destinationName,
                                                     DestinationType.Queue);
                  }
              }
  
              // Get destination list
              List<Destination> destinations = m_jmsManager.getDestinations();
  
              // If there are no Destinations, throw an exception
              if (destinations.size() == 0) {
                  throw new MessagingException("No destinations available for "
                          + "subscription, make sure that there is at least one topic "
                          + "or queue specified in the connection properties.");
              }
  
              // Subscribe
              for (Destination destination : destinations) {
                  if (m_durable && (destination instanceof Topic)) {
                      m_jmsManager.listenDurable((Topic) destination,
                                                 m_messageSelector,
                                                 this,
                                                 null);
                  } else {
                      m_jmsManager.listen(destination, m_messageSelector, this);
                  }
              }
          } catch (MessagingException me) {
              logger.error("MessagingException encountered attempting to start "
                      + "Messaging Client: " + m_clientId
                      + ". Exception message: " + me.getMessage(), me);
              throw me;
          }
      }
docs: Creates topics and queues and starts listeners