code: function handleProduceResponse(cb, err, res) {
      num_responses += 1;
      if (err) {
          console.log("Error producing message: " + err);
      } else {
          num_messages_acked += 1;
      }
  
      // We can only indicate were done if stdin was closed and we have no outstanding messages.
      checkSendingComplete(cb);
  }
docs: Handles produce responses