lib/kafka/Consumer.js
/**
   * Adds a listener at the end of the listeners array for the specified
   * event. No checks are made to see if the listener has already been
   * added. Multiple calls passing the same combination of event and
   * listener will result in the listener being added multiple times.
   *
   * @param {*} event one of the following:
   *  ready emitted when the consumer is ready
   *  disconnected emitted when the consumer is disconnected from Kafka by the client
   *  paused emitted when the consumer is paused (backpressure)
   *  resumed emitted when the consumer is resumed
   *  error.connecting emitted when the connection with Kafka failed
   *  error.processing emitted when a message couldn't be processed
   * @param {*} callback
   */
Adds a listener at the end of the listeners array for the specified
event. No checks are made to see if the listener has already been
added. Multiple calls passing the same combination of event and
listener will result in the listener being added multiple times.

@param {*} event one of the following:
ready emitted when the consumer is ready
disconnected emitted when the consumer is disconnected from Kafka by the client
paused emitted when the consumer is paused (backpressure)
resumed emitted when the consumer is resumed
error.connecting emitted when the connection with Kafka failed
error.processing emitted when a message couldn't be processed
@param {*} callback
Adds a listener at the end of the listeners array for the specified event . No checks are made to see if the listener has already been added . Multiple calls passing the same combination of event and listener will result in the listener being added multiple times . @param { * } event one of the following : ready emitted when the consumer is ready disconnected emitted when the consumer is disconnected from Kafka by the client paused emitted when the consumer is paused ( backpressure ) resumed emitted when the consumer is resumed error . connecting emitted when the connection with Kafka failed error . processing emitted when a message couldn ' t be processed @param { * } callback
on(event, callback) {
    if (EVENTS.includes(event)) {
      this.eventEmitter.addListener(event, callback);
    }
  }
on ( event , callback ) { if ( EVENTS . includes ( event ) ) { this . eventEmitter . addListener ( event , callback ) ; } }
Adds a listener at the end of the listeners array for the specified
 event.
Adds a listener at the end of the listeners array for the specified event .