Skip to content
m manifester.io
All Kafka APIs

DescribeTransactions

This page encodes the smallest legal instance of the request and the response: numeric fields are zero, strings and byte arrays are empty, every array carries exactly one sample element, and any records field holds one empty 61-byte RecordBatch v2. Version 0 is a flexible version, so every struct is terminated by a uvarint tagged-field count and strings and arrays carry compact length-plus-one prefixes. Sizes below include the leading int32 size prefix.

API key
65
Encoded at
v0
Flexible versions
0+
Headers
req v2, resp v1
Request versions
0
Response versions
0
Request size
18 bytes
Response size
50 bytes
framerpc headerrequest bodyRecordBatchRecordresponse bodytagged_fields

Request

DescribeTransactionsRequest v0, request header v2, 18 bytes on the wire

byte layout (18 bytes, 16 bytes per row)

0
1
2
3
4
5
6
7
8
9
A
B
C
D
E
F
0000
0010

object tree

DescribeTransactionsRequest      message v0                                    [0x0000, 18B]
+-- Frame                                                                      [0x0000, 4B]   length-delimited framing
|   +-- size                     int32            = 14                         [0x0000, 4B]   number of bytes that follow, patched after encoding
+-- RequestHeader                v2                                            [0x0004, 11B]  common request header
|   +-- request_api_key          int16            = 65 (DescribeTransactions)  [0x0004, 2B]   numeric id of the API being invoked
|   +-- request_api_version      int16            = 0                          [0x0006, 2B]   version of the API being invoked
|   +-- correlation_id           int32            = 0                          [0x0008, 4B]   echoed back by the broker in the response
|   +-- client_id                nullable_string  = "" (int16 len=0)           [0x000c, 2B]   always a non-flexible int16-prefixed string
|   +-- tagged_fields            uvarint          = 0                          [0x000e, 1B]   number of tagged fields in the header
+-- DescribeTransactionsRequest  struct                                        [0x000f, 3B]   message body, version 0
    +-- TransactionalIds         []string         = 1 element                  [0x000f, 2B]   Array of transactionalIds to include in describe results. If empty, then no...
    |   +-- length               uvarint          = 2 (compact, n+1)           [0x000f, 1B]   one sample element follows
    |   +-- string[0]            string           = "" (compact, len+1=1)      [0x0010, 1B]
    +-- tagged_fields            uvarint          = 0                          [0x0011, 1B]   number of tagged fields in this struct

kafka message schema (.json)

{
  "apiKey": 65,
  "type": "request",
  "listeners": ["broker"],
  "name": "DescribeTransactionsRequest",
  "validVersions": "0",
  "flexibleVersions": "0+",
  "fields": [
      { "name": "TransactionalIds", "entityType": "transactionalId", "type": "[]string", "versions": "0+",
        "about": "Array of transactionalIds to include in describe results. If empty, then no results will be returned." }
  ]
}

Response

DescribeTransactionsResponse v0, response header v1, 50 bytes on the wire

byte layout (50 bytes, 16 bytes per row)

0
1
2
3
4
5
6
7
8
9
A
B
C
D
E
F
0000
0010
0020
0030

object tree

DescribeTransactionsResponse            message v0                                   [0x0000, 50B]
+-- Frame                                                                            [0x0000, 4B]   length-delimited framing
|   +-- size                            int32               = 46                     [0x0000, 4B]   number of bytes that follow, patched after encoding
+-- ResponseHeader                      v1                                           [0x0004, 5B]   common response header
|   +-- correlation_id                  int32               = 0                      [0x0004, 4B]   matches the correlation_id of the request
|   +-- tagged_fields                   uvarint             = 0                      [0x0008, 1B]   number of tagged fields in the header
+-- DescribeTransactionsResponse        struct                                       [0x0009, 41B]  message body, version 0
    +-- ThrottleTimeMs                  int32               = 0                      [0x0009, 4B]   The duration in milliseconds for which the request was throttled due to a q...
    +-- TransactionStates               []TransactionState  = 1 element              [0x000d, 36B]  The current state of the transaction.
    |   +-- length                      uvarint             = 2 (compact, n+1)       [0x000d, 1B]   one sample element follows
    |   +-- TransactionState[0]         TransactionState    = struct                 [0x000e, 35B]
    |       +-- ErrorCode               int16               = 0                      [0x000e, 2B]   The error code.
    |       +-- TransactionalId         string              = "" (compact, len+1=1)  [0x0010, 1B]   The transactional id.
    |       +-- TransactionState        string              = "" (compact, len+1=1)  [0x0011, 1B]   The current transaction state of the producer.
    |       +-- TransactionTimeoutMs    int32               = 0                      [0x0012, 4B]   The timeout in milliseconds for the transaction.
    |       +-- TransactionStartTimeMs  int64               = 0                      [0x0016, 8B]   The start time of the transaction in milliseconds.
    |       +-- ProducerId              int64               = 0                      [0x001e, 8B]   The current producer id associated with the transaction.
    |       +-- ProducerEpoch           int16               = 0                      [0x0026, 2B]   The current epoch associated with the producer id.
    |       +-- Topics                  []TopicData         = 1 element              [0x0028, 8B]   The set of partitions included in the current transaction (if active). When...
    |       |   +-- length              uvarint             = 2 (compact, n+1)       [0x0028, 1B]   one sample element follows
    |       |   +-- TopicData[0]        TopicData           = struct                 [0x0029, 7B]
    |       |       +-- Topic           string              = "" (compact, len+1=1)  [0x0029, 1B]   The topic name.
    |       |       +-- Partitions      []int32             = 1 element              [0x002a, 5B]   The partition ids included in the current transaction.
    |       |       |   +-- length      uvarint             = 2 (compact, n+1)       [0x002a, 1B]   one sample element follows
    |       |       |   +-- int32[0]    int32               = 0                      [0x002b, 4B]
    |       |       +-- tagged_fields   uvarint             = 0                      [0x002f, 1B]   number of tagged fields in this struct
    |       +-- tagged_fields           uvarint             = 0                      [0x0030, 1B]   number of tagged fields in this struct
    +-- tagged_fields                   uvarint             = 0                      [0x0031, 1B]   number of tagged fields in this struct

kafka message schema (.json)

{
  "apiKey": 65,
  "type": "response",
  "name": "DescribeTransactionsResponse",
  "validVersions": "0",
  "flexibleVersions": "0+",
  "fields": [
      { "name": "ThrottleTimeMs", "type": "int32", "versions": "0+",
        "about": "The duration in milliseconds for which the request was throttled due to a quota violation, or zero if the request did not violate any quota." },
      { "name": "TransactionStates", "type": "[]TransactionState", "versions": "0+",
        "about": "The current state of the transaction.", "fields": [
        { "name": "ErrorCode", "type": "int16", "versions": "0+",
          "about": "The error code."},
        { "name": "TransactionalId", "type": "string", "versions": "0+", "entityType": "transactionalId",
          "about": "The transactional id."},
        { "name": "TransactionState", "type": "string", "versions": "0+",
          "about": "The current transaction state of the producer."},
        { "name": "TransactionTimeoutMs", "type": "int32", "versions": "0+",
          "about": "The timeout in milliseconds for the transaction."},
        { "name": "TransactionStartTimeMs", "type": "int64", "versions": "0+",
          "about": "The start time of the transaction in milliseconds."},
        { "name": "ProducerId", "type": "int64", "versions": "0+", "entityType": "producerId",
          "about": "The current producer id associated with the transaction."},
        { "name": "ProducerEpoch", "type": "int16", "versions": "0+",
          "about": "The current epoch associated with the producer id."},
        { "name": "Topics", "type": "[]TopicData", "versions": "0+",
          "about": "The set of partitions included in the current transaction (if active). When a transaction is preparing to commit or abort, this will include only partitions which do not have markers.",
          "fields": [
            { "name": "Topic", "type": "string", "versions": "0+", "entityType": "topicName", "mapKey": true,
              "about": "The topic name."},
            { "name": "Partitions", "type": "[]int32", "versions": "0+",
              "about": "The partition ids included in the current transaction."}
          ]
        }
      ]}
  ]
}