diff --git a/docs/content.zh/docs/connectors/datastream/kafka.md b/docs/content.zh/docs/connectors/datastream/kafka.md index 9c54aec7d..bb14d6f4b 100644 --- a/docs/content.zh/docs/connectors/datastream/kafka.md +++ b/docs/content.zh/docs/connectors/datastream/kafka.md @@ -110,7 +110,7 @@ Kafka Source 提供了 3 种 Topic / Partition 的订阅方式: {{< tabs "KafkaSource#setTopicPattern" >}} {{< tab "Java" >}} ```java - KafkaSource.builder().setTopicPattern("topic.*"); + KafkaSource.builder().setTopicPattern(Pattern.compile("topic.*")); ``` {{< /tab >}} {{< tab "Python" >}} diff --git a/docs/content/docs/connectors/datastream/kafka.md b/docs/content/docs/connectors/datastream/kafka.md index 0ab35af6a..6b4f8aa3c 100644 --- a/docs/content/docs/connectors/datastream/kafka.md +++ b/docs/content/docs/connectors/datastream/kafka.md @@ -110,7 +110,7 @@ Kafka source provide 3 ways of topic-partition subscription: {{< tabs "KafkaSource#setTopicPattern" >}} {{< tab "Java" >}} ```java - KafkaSource.builder().setTopicPattern("topic.*"); + KafkaSource.builder().setTopicPattern(Pattern.compile("topic.*")); ``` {{< /tab >}} {{< tab "Python" >}}