...
1// LeaderAndISRRequestTopicPartition is a common struct that is used across
2// different versions of LeaderAndISRRequest.
3LeaderAndISRRequestTopicPartition => not top level, no encoding, flexible v4+
4 Topic: string // v0-v1
5 Partition: int32
6 ControllerEpoch: int32
7 Leader: int32
8 LeaderEpoch: int32
9 ISR: [int32]
10 ZKVersion: int32
11 Replicas: [int32]
12 AddingReplicas: [int32] // v3+
13 RemovingReplicas: [int32] // v3+
14 IsNew: bool // v1+
15 LeaderRecoveryState: int8 // v6+
16
17// LeaderAndISRResponseTopicPartition is a common struct that is used across
18// different versions of LeaderAndISRResponse.
19LeaderAndISRResponseTopicPartition => not top level, no encoding, flexible v4+
20 Topic: string // v0-v4
21 Partition: int32
22 ErrorCode: int16
23
24// LeaderAndISRRequest is an advanced request that controller brokers use
25// to broadcast state to other brokers. Manually using this request is a
26// great way to break your cluster.
27//
28// As this is an advanced request and there is little reason to issue it as a
29// client, this request is undocumented.
30//
31// Kafka 1.0 introduced version 1. Kafka 2.2 introduced version 2, proposed
32// in KIP-380, which changed the layout of the struct to be more memory
33// efficient. Kafka 2.4.0 introduced version 3 with KIP-455.
34// Kafka 3.4 introduced version 7 with KIP-866.
35LeaderAndISRRequest => key 4, max version 7, flexible v4+
36 ControllerID: int32
37 // If KRaft controller id is used during migration. See KIP-866.
38 IsKRaftController: bool // v7+
39 ControllerEpoch: int32
40 BrokerEpoch: int64(-1) // v2+
41 Type: int8 // v5+
42 PartitionStates: [LeaderAndISRRequestTopicPartition] // v0-v1
43 TopicStates: [=>] // v2+
44 Topic: string
45 TopicID: uuid // v5+
46 PartitionStates: [LeaderAndISRRequestTopicPartition]
47 LiveLeaders: [=>]
48 BrokerID: int32
49 Host: string
50 Port: int32
51
52// LeaderAndISRResponse is returned from a LeaderAndISRRequest.
53LeaderAndISRResponse =>
54 ErrorCode: int16
55 Partitions: [LeaderAndISRResponseTopicPartition] // v0-v4
56 Topics: [=>] // v5+
57 TopicID: uuid
58 Partitions: [LeaderAndISRResponseTopicPartition]
View as plain text