Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Changed ProducerFenced Error code to InvalidProducerEpoch.

...

  • DuplicateSequenceNumber [NEW]

  • InvalidSequenceNumber [NEW]

  • ProducerFenced InvalidProducerEpoch [NEW]

  • UNSUPPORTED_FOR_MESSAGE_FORMAT

...

Code Block
languagetext
titleAddPartitionsToTxnResponse
AddPartitionsToTxnResponse => ErrorCode
 ErrorCode: int16

Error code:

  • Ok

  • ProducerFencedInvalidProducerEpoch

  • InvalidPidMapping

  • NotCoordinatorForTransactionalId

  • CoordinatorNotAvailable

  • InvalidTxnRequest

...

Code Block
languagetext
titleAddOffsetsToTxnResponse
AddOffsetsToTxnResponse => ErrorCode
 ErrorCode: int16
 Coordinator => NodeId Host Port
   NodeId => int32
   Host => string
   Port => int32

Error code:

  • Ok

  • ProducerFencedInvalidProducerEpoch

  • InvalidPidMapping

  • NotCoordinatorForTransactionalId

  • CoordinatorNotAvailable

  • InvalidTxnRequest

...

Code Block
languagetext
titleEndTxnResponse
EndTxnResponse => ErrorCode
 ErrorCode => int16

Error code:

  • Ok

  • ProducerFencedInvalidProducerEpoch

  • InvalidPidMapping

  • CoordinatorNotAvailable

  • NotCoordinatorForTransactionalId

  • InvalidTxnRequest

...

Code Block
languagetext
titleTxnOffsetCommitResponse
TxnOffsetCommitResponse => [TopicName [Partition ErrorCode]]]
 TopicName => string
 Partition => int32
 ErrorCode => int16

Error code:

  • ProducerFencedInvalidProducerEpoch

Message Format

In order to add new fields such as PID and epoch into the produced messages for transactional messaging and de-duplication, we need to change Kafka’s message format and bump up its version (i.e. the “magic byte”). More specifically, we need to add the following fields into each message:

...