public KafkaConsumer(final String topic) {
this.topic = topic;
Properties props = null;
try {
//read in default configuration
InputStream in = getClass().getResourceAsStream("/consumer.properties");
props = new Properties();
props.load(in);
config = new ConsumerConfig(props);
//in.close();
} catch (IOException e) {
e.printStackTrace();
}
}
KafkaConsumer.java 文件源码
java
阅读 29
收藏 0
点赞 0
评论 0
项目:dataflux
作者:
评论列表
文章目录