Node.js binding for librdkafka.
node-gyp configure
node-gyp build
node-gyp rebuild
var kafka = require("./lib/kafka");
var producer = new kafka.Producer({
zookeeper: "localhost:2181",
partition: 0,
topic: "test"
});
producer.connect(function() {
producer.send('message', function(err) {
...
}).on("sent", function(err) {
...
}).on("delivery", function(err, length) {
...
}).on("error", function(err) {
...
});
})
Please see examples directory for more. This project needs more testing and further direction.
node example.js
node example2.js
See LICENSE, and LICENSE.* for dependencies