View Source KlifeProtocol.Messages.WriteTxnMarkers (Klife Protocol v0.5.0)

Kafka protocol WriteTxnMarkers message

Request versions summary:

  • Version 1 enables flexible versions.

Response versions summary:

Link to this section Summary

Functions

Returns the message api key number.

Receive a binary in the kafka wire format and deserialize it into a map.

Returns the current max supported version of this message.

Returns the current min supported version of this message.

Receives a map and serialize it to kafka wire format of the given version.

Link to this section Functions

Returns the message api key number.

Link to this function

deserialize_response(data, version, with_header? \\ true)

View Source

Receive a binary in the kafka wire format and deserialize it into a map.

Response content fields:

  • markers: The results for writing makers. ([]WritableTxnMarkerResult | versions 0+)

    • producer_id: The current producer ID in use by the transactional ID. (int64 | versions 0+)

    • topics: The results by topic. ([]WritableTxnMarkerTopicResult | versions 0+)

      • name: The topic name. (string | versions 0+)

      • partitions: The results by partition. ([]WritableTxnMarkerPartitionResult | versions 0+)

        • partition_index: The partition index. (int32 | versions 0+)

        • error_code: The error code, or 0 if there was no error. (int16 | versions 0+)

Returns the current max supported version of this message.

Returns the current min supported version of this message.

Link to this function

serialize_request(map, version)

View Source

Receives a map and serialize it to kafka wire format of the given version.

Input content fields:

  • markers: The transaction markers to be written. ([]WritableTxnMarker | versions 0+)

    • producer_id: The current producer ID. (int64 | versions 0+)

    • producer_epoch: The current epoch associated with the producer ID. (int16 | versions 0+)

    • transaction_result: The result of the transaction to write to the partitions (false = ABORT, true = COMMIT). (bool | versions 0+)

    • topics: Each topic that we want to write transaction marker(s) for. ([]WritableTxnMarkerTopic | versions 0+)

      • name: The topic name. (string | versions 0+)

      • partition_indexes: The indexes of the partitions to write transaction markers for. ([]int32 | versions 0+)

    • coordinator_epoch: Epoch associated with the transaction state partition hosted by this transaction coordinator (int32 | versions 0+)