code: public void unsubscribe() {
          if (this.dispatcher != null) {
              throw new IllegalStateException(
                      "Subscriptions that belong to a dispatcher cannot respond to unsubscribe directly.");
          } else if (this.incoming == null) {
              throw new IllegalStateException("This subscription is inactive.");
          }
  
          if (isDraining()) { // No op while draining
              return;
          }
  
          this.connection.unsubscribe(this, -1);
      }
docs: Unsubscribe this subscription and stop listening for messages.
  
  <p>Messages are stopped locally and the server is notified.</p>