![](/img/trans.png)
[英]How to read from the _confluent-metrics topic in Java which is created by kafka
[英]How to specify which topic to listen to in kafka confluent connector?
我最近一直在研究kafka連接器,我想知道在哪里配置我的接收器連接器的worker任務應該聽的主題。
通常,SinkConnectorConfig看起來像這樣
name=MySinkConnector
tasks.max=1
connector.class=com.operative.creative.bi.sink.MySinkConnector
topics=demo
filePath=/tmp/output.txt
當使用rest-proxy控制工作程序配置時,可以覆蓋這些設置。 我想知道我們在哪里指定主題。
我知道屬性文件定義了一個名為"topics"
的屬性,但是在樣板代碼中看不到任何內容。
任何幫助將不勝感激。
topic = props.get(TOPIC_CONFIG);
看看https://docs.confluent.io/current/connect/devguide.html#connector-example ,還有https://gist.github.com/jcustenborder/b9b1518cc794e1c1895c3da7abbe9c08
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.