Getting Error "ECONNRESET at TLSWrap.onStreamRead" on producing message to event hub.
SakshamPatro opened this issue · 0 comments
SakshamPatro commented
Questions?
- Is kafka-node package compatible with azure event-hub like rdkafka plugin ? The output error is not clear to specify the same.
Environment
- Node version: 10
- Kafka-node version: 5
// Sample Code
const client = new kafka.KafkaClient({
kafkaHost: 'talabatkafka.servicebus.windows.net:9093',
ssl:true,
sasl: {
mechanism: 'plain',
username: '$ConnectionString',
password: 'Endpoint'
},
sslOptions: {
rejectUnauthorized: false,
}
});
const producer = new kafka.Producer(client);
const payload = [{ topic: "test_hub", messages: "Test message", partition: 0}];
producer.send(payload, function(error, result) {
Output
{ Error: read ECONNRESET
at TLSWrap.onStreamRead (internal/stream_base_commons.js:111:27) errno: 'ECONNRESET', code: 'ECONNRESET', syscall: 'read' }