public void set(long baseOffset, long logAppendTime, Function<Integer, RuntimeException> errorsByIndex) {
        this.baseOffset = baseOffset;
        this.logAppendTime = logAppendTime;
        this.errorsByIndex = errorsByIndex;
    }
Set the result of the produce request.

@param baseOffset The base offset assigned to the record
@param logAppendTime The log append time or -1 if CreateTime is being used
@param errorsByIndex Function mapping the batch index to the exception, or null if the response was successful
clients/src/main/java/org/apache/kafka/clients/producer/internals/ProduceRequestResult.java