title: Detect and control on clientside when a kafkajs consumer or producer timeouts
body: <p>Im new to kafka and to kafkajs.</p>
  <p>I have made a Kafka producer and consumer using <a href="https://kafka.js.org/" rel="nofollow noreferrer">kafkaJS</a>.</p>
  <p>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.</p>
  <p>I imagine there must be some sort of function assignment on the configuration, but I couldn't find anything on the docs so far.</p>