@Override
  public Object executeOnQueuesAndReturnPrimaryResult(final Op op) {
    if (queueManager == null) {
      throw new SubscriptionNotEnabledException();
    }
    final QueueConnections connections = queueManager.getAllConnections();

    final List<Connection> backups = connections.getBackups();
    if (logger.isTraceEnabled(LogMarker.BRIDGE_SERVER_VERBOSE)) {
      logger.trace(LogMarker.BRIDGE_SERVER_VERBOSE, "sending {} to backups: {}", op, backups);
    }
    for (int i = backups.size() - 1; i >= 0; i--) {
      final Connection connection = backups.get(i);
      try {
        executeWithPossibleReAuthentication(connection, op);
      } catch (Exception e) {
        handleException(e, connection, 0, false);
      }
    }

    Connection primary = connections.getPrimary();
    final HashSet<ServerLocation> attemptedPrimaries = new HashSet<>();
    while (true) {
      try {
        if (logger.isTraceEnabled(LogMarker.BRIDGE_SERVER_VERBOSE)) {
          logger.trace(LogMarker.BRIDGE_SERVER_VERBOSE, "sending {} to primary: {}", op, primary);
        }
        return executeWithPossibleReAuthentication(primary, op);
      } catch (Exception e) {
        if (logger.isTraceEnabled(LogMarker.BRIDGE_SERVER_VERBOSE)) {
          logger.trace(LogMarker.BRIDGE_SERVER_VERBOSE, "caught exception sending to primary {}",
              e.getMessage(), e);
        }
        final boolean finalAttempt = !attemptedPrimaries.add(primary.getServer());
        handleException(e, primary, 0, finalAttempt);
        primary = queueManager.getAllConnections().getPrimary();
        // we shouldn't reach this code, but just in case
        if (finalAttempt) {
          throw new ServerConnectivityException("Tried the same primary server twice.", e);
        }
      }
    }
  }
execute the given op on the given server. If the server cannot be reached, sends a
TXFailoverOp, then retries the given op

@param loc the server to execute the op on
@param op the op to execute
@return the result of execution
geode-core/src/main/java/org/apache/geode/cache/client/internal/OpExecutorImpl.java