Producer can be initialized using the following code sample in a Node.js app:
var Kafka = require('no-kafka');
var brokerURLs = process.env.KAFKA_URL.replace(/+ssl/g,'');
var producer = new Kafka.Producer({
connectionString: brokerURLs,
ssl: {
certFile: './client.crt',
keyFile: './client.key'
}
});
producer.init();