1.1.0 • Published 8 years ago

bunyan-nokafka v1.1.0

Weekly downloads
5
License
Apache-2.0
Repository
github
Last release
8 years ago

Build Code Climate Test Coverage License

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 opensource@ananse.io

License: Apache 2.0

1.1.0

8 years ago

1.0.0

8 years ago