/**
   * Return the match between the given two parameters with respect to the protocol.
   *
   * @param wildCardDestination The destination with/without wildcard
   * @param nonWildCardDestination The direct destination without wildcards
   * @return Match status
   * @throws AndesException
   */
  private boolean isMatchForProtocolType(String wildCardDestination, String nonWildCardDestination)
      throws AndesException {
    boolean matching = false;

    if (ProtocolType.AMQP == protocolType) {
      matching =
          AMQPUtils.isTargetQueueBoundByMatchingToRoutingKey(
              wildCardDestination, nonWildCardDestination);
    } else if (ProtocolType.MQTT == protocolType) {
      matching =
          MQTTUtils.isTargetQueueBoundByMatchingToRoutingKey(
              wildCardDestination, nonWildCardDestination);
    } else {
      throw new AndesException("Protocol type " + protocolType + " is not recognized.");
    }

    return matching;
  }