简体   繁体   English

Apache Camel Kafka-使用正则表达式订阅主题

[英]Apache Camel Kafka - use regular expression to subscribe to topics

Kafka client has next methods to subscribe to topics: Kafka客户端有以下订阅主题的方法:

  • subscribe(Collection topics) 订阅(收藏主题)
  • subscribe(Pattern pattern, ConsumerRebalanceListener listener) 订阅(模式模式,ConsumerRebalanceListener侦听器)

The second one is interesting because it is possible to define regular expression which matches with several topics. 第二个很有趣,因为可以定义与多个主题匹配的正则表达式。

As I saw in Camel Kafka plugin only the first method is used and it is not possible to use regular expression when you want to subscribe. 正如我在Camel Kafka插件中看到的那样,仅使用第一种方法,并且要订阅时无法使用正则表达式。

Is it possible somehow to use regular expression to subscribe with Camel Kafka plugin ? 是否可以使用正则表达式来订阅Camel Kafka插件? Will the Kafka plugin be extended with this option ? Kafka插件会使用此选项扩展吗?

No this is not possible currently. 否,目前无法实现。 You are welcome to log a JIRA to ask for such support in the future. 欢迎您登录JIRA寻求将来的支持。 You can find a link to issue tracker/JIRA here: http://camel.apache.org/support.html 您可以在此处找到发布问题跟踪器/ JIRA的链接: http : //camel.apache.org/support.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM