node-rdkafka: Consumer stops fetching messages
Hi,
Consumer stops fetching after getting following error
{ Error: Local: Broker transport failure at Error (native) origin: 'local', message: 'broker transport failure', code: -1, errno: -1, stack: 'Error: Local: Broker transport failure\n at Error (native)' }
All kafka servers are healthy even then I am getting the transport failure . After this error consumers stops fetching further messages
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 24 (7 by maintainers)
Hi @webmakersteve, we are facing the same issue in our environment. Thanks
Hi @webmakersteve we facing the same problem here š¦ do we have another open issue for this or an ETA for its resolution? Thx in advance!!
Thanks, Iāll set that up. In my case, I am consuming messages for a time before it gives up. What I have noticed is that occasionally I will see this error:
{ Error: Local: Broker transport failure origin: ālocalā, message: ābroker transport failureā, code: -1, errno: -1, stack: āError: Local: Broker transport failureā }
Most of the time the client recovers and will still consume messages, but at some point this error gets thrown and the consumer stops. I have been able to work around the issue by coding up this:
consumer.on(āreadyā, function() { console.log(āConsumer Readyā); consumer.subscribe([topic]); consumer.consume(); }); consumer.on(āevent.errorā, function(err) { console.log(err); consumer.disconnect(); }); consumer.on(ādisconnectedā, function(data) { console.log(āDisconnected. Reconnectingā¦ā); consumer.connect(); });
When I do this, the client reconnects to the broker and starts consuming the messages again.
Hi again. Attempting a re-consume on the error didnāt work for me. It has to be a full disconnect.
Hi
@webmakersteve Iāve experienced with the same problem. Consumer stops receiving messages from topic at some point. And in the log I see the only
node v9.11.1 node-rdkafka@2.3.2
My consumer
I donāt see any ārebalanceā or ādisconnectā calls in logs and according to Kafka-Tool the consumer is still connected and subscribed on topic but doesnāt receive any messages.