private RecordConsumer validator(RecordConsumer recordConsumer, boolean validating, MessageType schema) {
    return validating ? new ValidatingRecordConsumer(recordConsumer, schema) : recordConsumer;
  }
private RecordConsumer validator ( RecordConsumer recordConsumer , boolean validating , MessageType schema ) { return validating ? new ValidatingRecordConsumer ( recordConsumer , schema ) : recordConsumer ; }
TODO: have those wrappers for a converter