code: public List<Subscription> matches(String topic) {
          List<Token> tokens;
          try {
              tokens = splitTopic(topic);
          } catch (ParseException ex) {
              //TODO handle the parse exception
              Log.error(null, ex);
              return Collections.EMPTY_LIST;
          }
  
          Queue<Token> tokenQueue = new LinkedBlockingDeque<Token>(tokens);
          List<Subscription> matchingSubs = new ArrayList<Subscription>();
          subscriptions.matches(tokenQueue, matchingSubs);
          return matchingSubs;
      }
docs: Given a topic string return the clients subscriptions that matches it.
  Topic string can't contain character # and + because they are reserved to
  listeners subscriptions, and not topic publishing.