private void recoverCqs(Connection recoveredConnection, boolean isDurable) {
    Map<ClientCQ, Boolean> cqs = getPool().getRITracker().getCqsMap();
    for (Map.Entry<ClientCQ, Boolean> e : cqs.entrySet()) {
      ClientCQ cqi = e.getKey();
      String name = cqi.getName();
      if (pool.getMultiuserAuthentication()) {
        UserAttributes.userAttributes
            .set(((DefaultQueryService) pool.getQueryService()).getUserAttributes(name));
      }
      try {
        if (((CqStateImpl) cqi.getState()).getState() != CqStateImpl.INIT
            && cqi.isDurable() == isDurable) {
          cqi.createOn(recoveredConnection, isDurable);
        }
      } finally {
        UserAttributes.userAttributes.set(null);
      }
    }
  }
Find a new primary, adding any failed servers we encounter to the excluded servers list

First we try to make a backup server the primary, but if run out of backup servers we will try
to find a new server.
geode-core/src/main/java/org/apache/geode/cache/client/internal/QueueManagerImpl.java