conduktor.io ↗

Kafka InitProducerId Changelog — Protocol Version History

What is InitProducerId?

Every idempotent or transactional producer calls this before sending records to obtain a producer ID and epoch. The epoch prevents zombie producers: a restarted instance bumps the epoch, and late-arriving writes from the old instance are rejected with INVALID_PRODUCER_EPOCH.

VersionKafkaChanges
InitProducerIdRequest
v02.2
+ TransactionalId string
+ TransactionTimeoutMs int32
v12.2
is the same as version 0.
v22.4
~ Flexible encoding enabled FLEXIBLE
is the first flexible version.
v32.5
+ ProducerId int64
+ ProducerEpoch int16
adds ProducerId and ProducerEpoch, allowing producers to try to resume after an INVALID_PRODUCER_EPOCH error
v42.7
adds the support for new error code PRODUCER_FENCED.
v53.8
adds support for new error code TRANSACTION_ABORTABLE (KIP-890).
v64.1
+ Enable2Pc bool
+ KeepPreparedTxn bool
adds support for 2PC (KIP-939).
InitProducerIdResponse
v02.2
+ ThrottleTimeMs int32
+ ErrorCode int16
+ ProducerId int64
+ ProducerEpoch int16
v12.2
on quota violation, brokers send out responses before throttling.
v22.4
~ Flexible encoding enabled FLEXIBLE
is the first flexible version.
v32.5
is the same as version 2.
v42.7
adds the support for new error code PRODUCER_FENCED.
v53.8
adds support for new error code TRANSACTION_ABORTABLE (KIP-890).
v64.1
+ OngoingTxnProducerId int64
+ OngoingTxnProducerEpoch int16
adds support for 2PC (KIP-939).