code: public Future<WriteResponse> write(D record, @Nullable WriteCallback callback) {
      try {
        Future<RecordMetadata> future = this.accumulator.append(record, callback);
        return new WriteResponseFuture (future, WRITE_RESPONSE_WRAPPER);
      } catch (InterruptedException e) {
        throw new RuntimeException(e);
      }
    }
docs: Asynchronously write a record, execute the callback on success/failure