public PulsarSourceBuilder<OUT> setTopicPattern(
            Pattern topicsPattern, RegexSubscriptionMode regexSubscriptionMode) {
        ensureSubscriberIsNull("topic pattern");
        this.subscriber =
                PulsarSubscriber.getTopicPatternSubscriber(topicsPattern, regexSubscriptionMode);
        return this;
    }
Set a topic pattern to consume from the java {@link Pattern}. You can set topics once either
with {@link #setTopics} or {@link #setTopicPattern} in this builder.

<p>Remember that we will only subscribe to one tenant and one namespace by using regular
expression. If you didn't provide the tenant and namespace in the given topic pattern. We
will use default one instead.

@param topicsPattern the pattern of the topic name to consume from.
@param regexSubscriptionMode When subscribing to a topic using a regular expression, you can
    pick a certain type of topic.
    <ul>
      <li>PersistentOnly: only subscribe to persistent topics.
      <li>NonPersistentOnly: only subscribe to non-persistent topics.
      <li>AllTopics: subscribe to both persistent and non-persistent topics.
    </ul>

@return this PulsarSourceBuilder.
inlong-sort/sort-flink/sort-flink-v1.18/sort-connectors/pulsar/src/main/java/org/apache/inlong/sort/pulsar/source/PulsarSourceBuilder.java