public void appendLeaderChangeMessage(
        LeaderChangeMessage leaderChangeMessage,
        long currentTimestamp
    ) {
        appendControlMessages((baseOffset, epoch, compression, buffer) ->
            MemoryRecords.withLeaderChangeMessage(
                baseOffset,
                currentTimestamp,
                epoch,
                buffer,
                leaderChangeMessage
            )
        );
    }
Append a {@link LeaderChangeMessage} record to the batch

@param leaderChangeMessage The message to append
@param currentTimestamp The current time in milliseconds
@throws IllegalStateException on failure to allocate a buffer for the record
raft/src/main/java/org/apache/kafka/raft/internals/BatchAccumulator.java