摘要: 消费者api,自动提交offset public class MyConsumer { public static void main(String[] args) { Properties props = new Properties(); //连接的集群 props.put(ConsumerCo 阅读全文
posted @ 2020-05-10 23:42 地中有山 阅读(811) 评论(0) 推荐(1) 编辑
摘要: 一 生产者基本API 创建主题 bin/kafka-topics.sh --zookeeper hadoop102:2181 --create --topic first --replication-factor 2 --partitions 2 生产者代码 1 public class MyPro 阅读全文
posted @ 2020-05-10 14:44 地中有山 阅读(244) 评论(0) 推荐(0) 编辑