public boolean dropBroker(final String consumerGroupId) {
    final AtomicBoolean dropped = new AtomicBoolean(false);
    consumerGroupIdToSubscriptionBroker.compute(
        consumerGroupId,
        (id, broker) -> {
          if (Objects.isNull(broker)) {
            LOGGER.warn(
                "Subscription: broker bound to consumer group [{}] does not exist",
                consumerGroupId);
            dropped.set(true);
            return null;
          }
          if (!broker.isEmpty()) {
            LOGGER.warn(
                "Subscription: broker bound to consumer group [{}] is not empty when dropping",
                consumerGroupId);
            return broker;
          }
          dropped.set(true);
          LOGGER.info("Subscription: drop broker bound to consumer group [{}]", consumerGroupId);
          return null; // remove this entry
        });
    return dropped.get();
  }
@return {@code true} if drop broker success, {@code false} otherwise
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/agent/SubscriptionBrokerAgent.java