...
1// EndTxnRequest ends a transaction. This should be called after
2// TxnOffsetCommitRequest.
3EndTxnRequest => key 26, max version 3, flexible v3+, txn coordinator
4 // TransactionalID is the transactional ID to use for this request.
5 TransactionalID: string
6 // ProducerID is the producer ID of the client for this transactional ID
7 // as received from InitProducerID.
8 ProducerID: int64
9 // ProducerEpoch is the producer epoch of the client for this transactional ID
10 // as received from InitProducerID.
11 ProducerEpoch: int16
12 // Commit is whether to commit this transaction: true for yes, false for abort.
13 Commit: bool
14
15// EndTxnResponse is a response for an EndTxnRequest.
16EndTxnResponse =>
17 ThrottleMillis(1)
18 // ErrorCode is any error for this topic/partition commit.
19 //
20 // TRANSACTIONAL_ID_AUTHORIZATION_FAILED is returned if the client is
21 // not authorized for write with transactional IDs with the requested
22 // transactional ID.
23 //
24 // INVALID_REQUEST is returned if the transactional ID is invalid.
25 //
26 // INVALID_PRODUCER_ID_MAPPING is returned if the produce request used
27 // a producer ID that is not tied to the transactional ID (i.e., mismatch
28 // from what was returned from InitProducerID).
29 //
30 // INVALID_PRODUCER_EPOCH is returned if the requested epoch does not match
31 // the broker epoch for this transactional ID.
32 //
33 // CONCURRENT_TRANSACTIONS is returned if there is an ongoing transaction for
34 // this transactional ID, if the producer ID and epoch matches the broker's.
35 //
36 // INVALID_TXN_STATE is returned if this request is attempted at the wrong
37 // time (given the order of how transaction requests should go).
38 ErrorCode: int16
View as plain text