Open
Description
Environment Information
- node-rdkafka version: 3.1.0
Steps to Reproduce
const { Producer } = require('node-rdkafka');
async function produce() {
const producer = new Producer({
'client.id': 'client-id',
'metadata.broker.list': 'localhost:9092',
});
await producer.connect();
// ...wait for readiness
producer.produce('local.ssh-sender', null, Buffer.from('Hello Kafka!'), 'key', Date.now());
process.exit(0)
}
produce();
Additional context
This code will never send the message in the kafka queue because producer.produce
is not a promise so process.exit
will be executed (almost) at the same time
Metadata
Assignees
Labels
No labels