bunyan-nokafka
v1.1.0
Published
Bunyan Kafka Stream for Kafka 0.9
Downloads
229
Readme
Bunyan Kafka Stream Plugin
bunyan-nokafka is bunyan stream for Kafka with no-kafka library.
Usage
const bunyan = require('bunyan');
const KafkaStream = require('bunyan-nokafka');
const logger = bunyan.createLogger({
name: 'cached-rethinkdb-test',
});
const kafkaStream = new KafkaStream({
topic: 'log-topic',
kafkaOpts: {
connectionString: '127.0.0.1:9092',
partitioner: KafkaStream.roundRobinPartitioner(),
},
});
kafkaStream.on('ready', () => {
logger.addStream({
level: bunyan.INFO,
stream: kafkaStream,
});
});
Kafka Options
Please refer to no-kafka producer options
Author
Ananse Limited [email protected]