Versions Compared

Key

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

...

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)

Application Recoverable

KafkaException

Abortable (default seems to be abortable)

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

Application Recoverable (not expected)

Application Recoverable (not expected)

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)

Application Recoverable (not expected)

...


InvalidTxnStateException requires special handling where producer API and Transactional API has different handling:

Exception/Error Names

Current handling

Expected Handling


Producer API

Transaction API

Producer API

Transaction API

AuthenticationException

InvalidTxnStateException

Abortable

Fatal

Producer Abortable (KIP-890 relies on this – note this is the only one that differs with Produce API) Image Added

Application Recoverable Image Added

InvalidConfigurationTransactionException

Exception/Error Names

Current handling

Expected Handling

Producer API

Transaction API

Producer API

Transaction API

InvalidTxnStateException

Abortable

Fatal

Producer Abortable (KIP-890 relies on this – note this is the only one that differs with Produce API)

Exception/Error Names

Current handling

Expected Handling


Producer API

Transaction API

Producer API

Transaction API

AuthenticationException

Abortable

Fatal

Invalid Configuration Image Added

Invalid Configuration (not expected) Image Added

ClusterAuthorizationException

TransactionalIdAuthorizationException

UnsupportedVersionException

UnsupportedForMessageFormatException

Invalid Configuration Image Removed

Invalid Configuration (not expected) Image Removed

ClusterAuthorizationException

TransactionalIdAuthorizationException

UnsupportedVersionException

UnsupportedForMessageFormatException

Fatal, except UnsupportedForMessageFormatException which is Abortable

Cluster/Transaction Auth → abortable on InitProducerId, other errors abortable

TransactionAuth → fatal, others abortable for AddPartitions, Find Coordinator, EndTxn, AddOffsets

Transaction Auth, UnssupportedForMessageFormat → fatal for OffsetCommit

Invalid Configuration

Invalid Configuration

InvalidRecordException

InvalidRequiredAcksException

RecordBatchTooLargeException

InvalidTopicException

Retriable if the error is retriable. Otherwise abortable

Retriable if the error is retriable otherwise abortable

Invalid Configuration

Invalid Configuration

TopicAuthorizationException

GroupAuthorizationException

Abortable

Abortable

Invalid Configuration

Invalid Configuration Image Removed

InvalidTxnStateException requires special handling where producer API and Transactional API has different handling:

Image Modified

Application Recoverable Image Removed


Public Interfaces

We will add new exception types, as listed in the table below, that extend the existing exceptions.

...