测试用kafka生产者发送消息时候警告,因为,kafka集群没有全部起来,第一次只是启动了一个集群,所有有两个connection 节点找不到,第二次开启了节点2,节点2的警告消失,第三次全部节点开启,警告消失。
1.[trustfar@bigdata01 ~]$ kafka-console-producer.sh --broker-list bigdata01:9092,bigdata02:9092,bigdata03:9092 --topic test1

s
[2019-03-15 20:07:38,810] WARN [Producer clientId=console-producer] Connection to node -2 could not be established. Broker may not be available. (org.apache.kafka.clients.NetworkClient)
[2019-03-15 20:07:38,922] WARN [Producer clientId=console-producer] Connection to node -2 could not be established. Broker may not be available. (org.apache.kafka.clients.NetworkClient)
[2019-03-15 20:07:38,926] WARN [Producer clientId=console-producer] Connection to node -3 could not be established. Broker may not be available. (org.apache.kafka.clients.NetworkClient)
dcdsc
cdassa
sadfasf

2.[trustfar@bigdata01 ~]$ kafka-console-producer.sh --broker-list bigdata01:9092,bigdata02:9092,bigdata03:9092 --topic test1

adc
[2019-03-15 20:13:13,629] WARN [Producer clientId=console-producer] Connection to node -3 could not be established. Broker may not be available. (org.apache.kafka.clients.NetworkClient)
[2019-03-15 20:13:13,749] WARN [Producer clientId=console-producer] Connection to node -3 could not be established. Broker may not be available. (org.apache.kafka.clients.NetworkClient)
daf

3.[trustfar@bigdata01 ~]$ kafka-console-producer.sh --broker-list bigdata01:9092,bigdata02:9092,bigdata03:9092 --topic test1

sssssssss
cdascsd

Logo

Kafka开源项目指南提供详尽教程,助开发者掌握其架构、配置和使用,实现高效数据流管理和实时处理。它高性能、可扩展,适合日志收集和实时数据处理,通过持久化保障数据安全,是企业大数据生态系统的核心。

更多推荐