kafka正在3服务器上以群集模式运行。
我创建了主题( testdemo
)在命令行下面,
kafka-topics.bat --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic testdemo
我发布的数据低于生产者财产,
Properties props = new Properties();
props.put("bootstrap.servers", "ip:9003");
props.put("metadata.broker.list", "ip1:9091, ip2:9092, ip3:9093");
props.put("producer.type", "async");
props.put("batch.size", "500");
props.put("compression.codec", "1");
props.put("compression.topic", topicName);
props.put("key.serializer", keySerializer);
props.put("value.serializer", ValueSerializer);
发布主题中的数据时出错,
Error when sending message to topic testdemo with key: null, value: 9 bytes with error:
Failed to update metadata after 60000 ms.
(org.apache.kafka.clients.producer.internals.ErrorLoggingCallback)
暂无答案!
目前还没有任何答案,快来回答吧!