kafka 求助
var Kafka = require(‘no-kafka’); var producer = new Kafka.Producer({ connectionString: ‘172.28.18.45:9092,172.28.18.46:9092,172.28.18.47:9092’ });
producer.init().then(function(){ return producer.send({ topic: ‘test’, partition: 0, message: { value: ‘Hello!’ } }); }) .then(function (result) { /* [ { topic: ‘kafka-test-topic’, partition: 0, offset: 353 } ] */ console.log(result); });
显示 提交成功了 为啥 库里查不到
2 回复
你的topic创建了么!这会有影响么?
没影响