code: @Override
    public Realm matchRealm(IRequest request) {
      try {
        // once again casting...
        IMessage req = (IMessage) request;
        String destinationRealm = req.getAvps().getAvp(Avp.DESTINATION_REALM).getDiameterIdentity();
        // we have req, we need match, not dummy longest from right BS match.
        return this.matchRealm(req, destinationRealm);
      }
      catch (Exception e) {
        logger.error("Unable to read Destination-Realm AVP to match realm to request", e);
      }
  
      return null;
    }
docs: /*
  (non-Javadoc)
  @see org.jdiameter.client.api.controller.IRealmTable#matchRealm(org.jdiameter.client.api.IRequest)