// WriteTxnMarkersRequest is a broker-to-broker request that Kafka uses to
// finish transactions.
WriteTxnMarkersRequest => key 27, max version 1, flexible v1+
  // Markers contains transactional markers to be written.
  Markers: [=>]
    // ProducerID is the current producer ID to use when writing a marker.
    ProducerID: int64
    // ProducerEpoch is the current producer epoch to use when writing a
    // marker.
    ProducerEpoch: int16
    // Committed is true if this marker is for a committed transaction,
    // otherwise false if this is for an aborted transaction.
    Committed: bool
    // Topics contains the topics we are writing markers for.
    Topics: [=>]
      // Topic is the name of the topic to write markers for.
      Topic: string
      // Partitions contains partitions to write markers for.
      Partitions: [int32]
    // CoordinatorEpoch is the current epoch of the transaction coordinator we
    // are writing a marker to. This is used to detect fenced writers.
    CoordinatorEpoch: int32

// WriteTxnMarkersResponse is a response to a WriteTxnMarkersRequest.
WriteTxnMarkersResponse =>
  // Markers contains results for writing transactional markers.
  Markers: [=>]
    // ProducerID is the producer ID these results are for (from the input
    // request).
    ProducerID: int64
    // Topics contains the results for the write markers request.
    Topics: [=>]
      // Topic is the topic these results are for.
      Topic: string
      // Partitions contains per-partition results for the write markers
      // request.
      Partitions: [=>]
        // Partition is the partition this result is for.
        Partition: int32
        // ErrorCode is non-nil if writing the transansactional marker for this
        // partition errored.
        //
        // CLUSTER_AUTHORIZATION_FAILED is returned if the user does not have
        // CLUSTER_ACTION on CLUSTER.
        //
        // NOT_LEADER_OR_FOLLOWER is returned if the broker receiving this
        // request is not the leader of the partition.
        //
        // UNKNOWN_TOPIC_OR_PARTITION is returned if the topic or partition is
        // not known to exist.
        //
        // INVALID_PRODUCER_EPOCH is returned if the cluster epoch is provided
        // and the provided epoch does not match.
        ErrorCode: int16
