Search code examples
javascriptapache-kafkakafkajs

Detect and control on clientside when a kafkajs consumer or producer timeouts


Im new to kafka and to kafkajs.

I have made a Kafka producer and consumer using kafkaJS.

I want to know how can I control what happens on my js code when the consumer or producer times out on the connection with the kafka server.

I imagine there must be some sort of function assignment on the configuration, but I couldn't find anything on the docs so far.


Solution

  • You can listen for REQUEST_TIMEOUT event of instrumentation events of KafkaJS