docs: @Override
    public void stop() {
      synchronized (this) {
        setStateAndNotify(State.STOPPING);
        ArrayList<SubscriptionRecord> values = new ArrayList<>(subscriptions.values());
        for (SubscriptionRecord subscription : values) {
          doUnsubscribe(subscription.subscription);
        }
        disconnect(true);
      }
    }