kafka集群搭建好了。
./bin/kafka-console-producer.sh --broker-list 192.168.42.xx:9095 --topic topic12
./bin/kafka-console-consumer.sh --bootstrap-server 192.168.42.xx:9095 --from-beginning --topic topic12
用命令的客户端测试。都能收到消息。但是用项目程序连接集群。消费数据,一直卡着不动。
版本是kafka_2.12-0.11.0.1
上面的日志是server.log的。
项目DUBG日志为:
2017-12-21 17:41:39-[DEBUG]-(org.apache.kafka.clients.consumer.internals.AbstractCoordinator$GroupCoordinatorResponseHandler:615) Group coordinator lookup for group DemoConsumer failed: The coordinator is not available.
2017-12-21 17:41:39-[DEBUG]-(org.apache.kafka.clients.consumer.internals.AbstractCoordinator:225) Coordinator discovery failed for group DemoConsumer, refreshing metadata