发布时间:2017-09-12 21:21:18
package com.xx.bigdata.kafkaTool;import org.apache.kafka.clients.consumer.ConsumerRecord;import org.apache.kafka.clients.consumer.ConsumerRecords;import org.apache.kafka.clients.consumer.KafkaConsumer;import java.util.Arrays;import java.util.Properties;public class Consumer { .........【阅读全文】
发布时间:2017-09-12 21:17:42
1;首先创建topic ./bin/kafka-topics.sh -zookeeper zk1:2181,zk2:2181,zk3:2181 -topic test -replication-factor 3 -partition 3 -create2:查看topic./bin/kafka-topics.sh -zookeeper zk1:2181,zk2:2181,zk3:2181 -list3:然后执行如下代码点击(此处)折叠或打开package com.xx.b.........【阅读全文】