Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Each error code always represent the same class and rarely rely on client state to determine how to handle. 

Additionally, while While it is good to have a mapping, It is also useful to have a general strategy – ie a typical unknown error (not specified by the client to have a type) should probably be application recoverable.

...

Yellow → Needs modificationGreen Image Removed → New exceptions added as part of this KIP

Check Exception handling match as mentioned in KIP-691

...

Image RemovedN/A

Exception/Error Names

Current handling

New Handling


Producer API

Transaction API

Producer API

Transaction API

IllegalStateExceptionInvalidProducerEpochException

Abortable

Sometimes Fatal depending on whether application or Sender caused issue. See: kafka: KAFKA-14831: Illegal state errors should be fatal in transactional producerCLOSED

Application Recoverable (probably not expected) Image Removed Image Added

Application Recoverable Image Modified

InvalidProducerEpochExceptionProducerFencedException

AbortableFatal

Fatal

Application Recoverable

Image Added

Application Recoverable

ProducerFencedException

Fatal

Fatal

Application Recoverable Image Removed

Application Recoverable Image Removed

InvalidPidMappingException

Sometimes retriable (no longer returned) or abortable

Abortable

Application Recoverable

Application Recoverable

UnknownProducerIdException

Sometimes retriable (no longer returned) or abortable

Abortable

Application Recoverable

Application Recoverable

FencedInstanceIdException

CommitFailedException

UnknownMemberIdException

IllegalGenerationExceiption

N/A

Abortable (TxnOffsetCommit Only)

CommitFailedException

UnknownMemberIdException

IllegalGenerationExceiption

N/A

Abortable (TxnOffsetCommit Only)

N/A

Application Recoverable Image Added

CorrelationIdMismatchException



Application Recoverable

Application Recoverable


We will handle all default exceptions as generic unknown errors, which will be application recoverable. Below are few such exceptions:

Exception/Error Names

Current handling

New Handling


Producer API

Transaction API

Producer API

Transaction API

IllegalStateException

Abortable

Sometimes Fatal depending on whether application or Sender caused issue. See: kafka: KAFKA-14831: Illegal state errors should be fatal in transactional producerCLOSED

Application Recoverable (probably not expected) Image Added

Application RecoverableImage Modified

KafkaException

Abortable (default seems to be abortable)

Fatal in most cases, but abortable when there are partition errors

Application Recoverable (not expected) Image Modified

Application Recoverable (not expected) Image Modified

RuntimeException

Abortable (default seems to be abortable)

Fatal – only thrown as this generic type when correlation ID is wrong. This should be updated as KIP-691 suggests

Application Recoverable (not expected) Image Modified

Application Recoverable (not expected) Image Modified

CorrelationIdMismatchException

Application Recoverable

Application Recoverable

InvalidConfigurationTransactionException

...