THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
We shall bump the EndTxn to include the actual written partitions so that the session gets updated.
Code Block | ||
---|---|---|
| ||
{
"apiKey": 26,
"type": "request",
"name": "EndTxnRequest",
// Version 1 is the same as version 0.
//
// Version 2 adds the support for new PRODUCER_FENCED error code.
//
// Version 3
"validVersions": "0-3",
"flexibleVersions": "none",
"fields": [
{ "name": "TransactionalId", "type": "string", "versions": "0+", "entityType": "transactionalId",
"about": "The ID of the transaction to end." },
{ "name": "ProducerId", "type": "int64", "versions": "0+", "entityType": "producerId",
"about": "The producer ID." },
{ "name": "ProducerEpoch", "type": "int16", "versions": "0+",
"about": "The current epoch associated with the producer." },
{ "name": "Committed", "type": "bool", "versions": "0+",
"about": "True if the transaction was committed, false if it was aborted." },
// -------------- START NEW FIELD --------------
{ "name": "Topics", "type": "[]EndTxnTopic", "versions": "3+",
"about": "The partitions ending up writing in current transaction.", "fields": [
{ "name": "Name", "type": "string", "versions": "0+", "mapKey": true, "entityType": "topicName",
"about": "The name of the topic." },
{ "name": "Partitions", "type": "[]int32", "versions": "3+",
"about": "The partition indexes to add to the transaction" }
]}
// -------------- END NEW FIELD --------------
]
}
|
We would also bump beginTransaction API on the KafkaProducer to give user the access for including the pre-registered partitions. The only exception is that during the transaction session the offset topic is still able to be added.
...