public static synchronized void stopHAServices() {
    if (qrmThread != null) {
      qrmThread.shutdown();
      qrmThread = null;
      dispatchedMessagesMap.clear();
      dispatchedMessagesMap = null;

    }
  }
Clears the dispatchedMessagesMap and shuts down the QueueRemovalThread.
geode-core/src/main/java/org/apache/geode/internal/cache/ha/HARegionQueue.java