...
1// TxnOffsetCommitRequest sends offsets that are a part of this transaction
2// to be committed once the transaction itself finishes. This effectively
3// replaces OffsetCommitRequest for when using transactions.
4TxnOffsetCommitRequest => key 28, max version 3, flexible v3+, group coordinator
5 // TransactionalID is the transactional ID to use for this request.
6 TransactionalID: string
7 // Group is the group consumed in this transaction and to be used for
8 // committing.
9 Group: string
10 // ProducerID is the producer ID of the client for this transactional ID
11 // as received from InitProducerID.
12 ProducerID: int64
13 // ProducerEpoch is the producer epoch of the client for this transactional ID
14 // as received from InitProducerID.
15 ProducerEpoch: int16
16 // Generation is the group generation this transactional offset commit request is for.
17 Generation: int32(-1) // v3+
18 // MemberID is the member ID this member is for.
19 MemberID: string // v3+
20 // InstanceID is the instance ID of this member in the group (KIP-345, KIP-447).
21 InstanceID: nullable-string // v3+
22 // Topics are topics to add for pending commits.
23 Topics: [=>]
24 // Topic is a topic to add for a pending commit.
25 Topic: string
26 // Partitions are partitions to add for pending commits.
27 Partitions: [=>]
28 // Partition is a partition to add for a pending commit.
29 Partition: int32
30 // Offset is the offset within partition to commit once EndTxnRequest is
31 // called (with commit; abort obviously aborts).
32 Offset: int64
33 // LeaderEpoch, proposed in KIP-320 and introduced in Kafka 2.1.0,
34 // allows brokers to check if the client is fenced (has an out of date
35 // leader) or is using an unknown leader.
36 //
37 // The initial leader epoch can be determined from a MetadataResponse.
38 // To skip log truncation checking, use -1.
39 LeaderEpoch: int32(-1) // v2+
40 // Metadata is optional metadata the client wants to include with this
41 // commit.
42 Metadata: nullable-string
43
44// TxnOffsetCommitResponse is a response to a TxnOffsetCommitRequest.
45TxnOffsetCommitResponse =>
46 ThrottleMillis(1)
47 // Topics contains responses to the topics in the request.
48 Topics: [=>]
49 // Topic is the topic this response is for.
50 Topic: string
51 // Partitions contains responses to the partitions in this topic.
52 Partitions: [=>]
53 // Partition is the partition this response is for.
54 Partition: int32
55 // ErrorCode is any error for this topic/partition commit.
56 //
57 // TRANSACTIONAL_ID_AUTHORIZATION_FAILED is returned if the client is
58 // not authorized for write with transactional IDs with the requested
59 // transactional ID.
60 //
61 // GROUP_AUTHORIZATION_FAILED is returned if the client is not authorized
62 // to read group with the requested group id.
63 //
64 // TOPIC_AUTHORIZATION_FAILED is returned for all topics that the client
65 // is not authorized to read.
66 //
67 // UNKNOWN_TOPIC_OR_PARTITION is returned for all topics or partitions
68 // that the broker does not know of.
69 //
70 // INVALID_GROUP_ID is returned if the requested group does not exist.
71 //
72 // COORDINATOR_NOT_AVAILABLE is returned if the broker is not yet fully
73 // started or is shutting down, or if the group was just deleted or is
74 // migrating to another broker.
75 //
76 // COORDINATOR_LOAD_IN_PROGRESS is returned if the group is still loading.
77 //
78 // NOT_COORDINATOR is returned if the broker is not the coordinator for
79 // the group.
80 //
81 // FENCED_INSTANCE_ID is returned if the member is fenced (another newer
82 // transactional member is using the same instance ID).
83 //
84 // UNKNOWN_MEMBER_ID is returned if the consumer group does not know of
85 // this member.
86 //
87 // ILLEGAL_GENERATION is returned if the consumer group's generation is
88 // different than the requested generation.
89 //
90 // OFFSET_METADATA_TOO_LARGE is returned if the commit metadata is too
91 // large.
92 //
93 // REBALANCE_IN_PROGRESS is returned if the group is completing a rebalance.
94 ErrorCode: int16
View as plain text