void closeProviders() {
    for (final AbstractSubscriptionProvider provider : getAllProviders()) {
      try {
        provider.close();
      } catch (final Exception e) {
        LOGGER.warn("Failed to close subscription provider {} because of {}", provider, e, e);
      }
    }
    subscriptionProviders.clear();
  }
Caller should ensure that the method is called in the lock {@link #acquireWriteLock()}.
iotdb-client/session/src/main/java/org/apache/iotdb/session/subscription/consumer/base/AbstractSubscriptionProviders.java