private void ensureCqID(ServerCQ cq) {
    if (cq.getFilterID() == null) {
      // on-wire IDs are assigned in the VM where the CQ was registered
      assert isLocalProfile;
      cq.setFilterID(cqMap.getWireID(cq.getServerCqName()));
    }
  }
ensure that the given query contains a filter routing ID
geode-core/src/main/java/org/apache/geode/internal/cache/FilterProfile.java