public void addSubscription(final String consumerId, final Set<String> topics) {
    if (!consumerIdToConsumerMeta.containsKey(consumerId)) {
      throw new SubscriptionException(
          String.format(
              "Failed to add subscription to consumer group meta: consumer %s does not exist in consumer group %s",
              consumerId, consumerGroupId));
    }

    for (final String topic : topics) {
      topicNameToSubscribedConsumerIdSet
          .computeIfAbsent(
              topic,
              k -> {
                if (shouldRecordSubscriptionCreationTime()) {
                  topicNameToSubscriptionCreationTime.put(topic, System.currentTimeMillis());
                }
                return new HashSet<>();
              })
          .add(consumerId);
    }
  }
Get the consumers subscribing the given topic in this group.

@param topic The topic name.
@return The set of consumer IDs subscribing the given topic in this group. If no consumer is
    subscribing the topic, return an empty set.
iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/subscription/meta/consumer/ConsumerGroupMeta.java