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.

@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 topics.
    <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.15/sort-connectors/pulsar/src/main/java/org/apache/inlong/sort/pulsar/source/PulsarSourceBuilder.java