Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
clientId: this.clientId,
brokers: this.brokers,
logLevel: 5, //logLevel.DEBUG,
logCreator: this.serviceLogger
})
// Map kafka-node log to service logger
let serviceLogger = (name) => {
return {
debug: this.logger.debug,
info: this.logger.info,
warn: this.logger.warn,
error: this.logger.error
}
}
kafkaLogging.setLoggerProvider(serviceLogger);
// Must be required after custom logger is set
kafka = require('kafka-node')
HighLevelProducer = kafka.HighLevelProducer;
this.topics = {
events: this.settings.topics ? this.settings.topics.events || 'events' : 'events'
}
this.subscriptions = [];
this.consumers = [];
},