You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Kafka HDFS Connect是否支持通过模式指定订阅主题?

Kafka HDFS Connect: Topic List & Pattern Matching Support

Great question! The short answer is yes—Kafka HDFS Connect absolutely supports subscribing to either a list of specific topics or using a topic pattern match, even if you didn't spot these configs in the HDFS Connector's dedicated documentation.

Here's how it works:

  • Subscribe to a fixed list of topics
    Use the topics configuration property (a core Kafka Connect setting, not HDFS-specific) to list comma-separated topic names. For example:

    topics=user_events,order_updates,payment_logs
    
  • Subscribe using a topic regex pattern
    If you want to match dynamically against topics that follow a naming pattern, use the topic.regex property instead. This will capture all existing (and future-created) topics that match the regex. For example, to match all topics starting with kafka_hdfs_:

    topic.regex=kafka_hdfs_.*
    

    Important note: Don't set both topics and topic.regex at the same time—they're mutually exclusive, and the connector will throw an error if you try.

Quick Notes

  • These are core Kafka Connect framework configurations, not unique to the HDFS Connector, which is why they don't appear in the HDFS-specific docs.
  • When using topic.regex, the connector will automatically detect new topics that match the pattern while it's running—no need to restart the connector.
  • Make sure the connector's service account has read access to all topics that match your pattern, otherwise you'll run into authorization errors.

内容的提问来源于stack exchange,提问作者Naveen

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.29 07:43:25