Versions Compared

Key

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

...

Please keep the discussion on the mailing list rather than commenting on the wiki (wiki discussions get unwieldy fast).

Motivation

 CurrentlyCurrently, Kafka Streams does not support ProcessingExceptionHandler for GlobalKTable processors. When a processing exception occurs during GlobalKTable record processing, the GlobalStreamThread fails and terminates, causing the entire Kafka  Kafka Streams application to shut-down. This behavior is inconsistent with regular KStream/KTable processing, where ProcessingExceptionHandler allows applications to handle exceptions gracefully and continue processing.

...

This KIP extends the applicability of the existing ProcessingExceptionHandler to GlobalKTable processors. Currently, this exception handler only applies to regular stream regular stream processing (KStream/KTable). After this KIP, the same handler will also
handle also handle processing exceptions in GlobalKTable.

...

  - KStream processing exceptions (existing)
  - KTable processing exceptions (existing)
  - GlobalKTable processing exceptions (new capability added by this KIP)

 Current Current State

Currently, while DeserializationExceptionHandler is passed to both regular stream tasks and global state update tasks, ProcessingExceptionHandler is only passed to regular stream tasks, resulting in unhandled processing exceptions for GlobalKTable processors.

 Proposed Proposed Extension

The infrastructure for configuration and instantiation of ProcessingExceptionHandler already exists. However, it is currently only passed to regular stream tasks, not to global state update tasks. This KIP extends the existing pattern to pass ProcessingExceptionHandler to GlobalStateUpdateTask, mirroring how DeserializationExceptionHandler is already passed to both regular and global tasks. This enables exception handling during GlobalKTable processor execution.

Implementation

  Add ProcessingExceptionHandler as a constructor parameter to GlobalStateUpdateTask and pass it to processor initialization, mirroring the existing DeserializationExceptionHandler implementation.

...

Rejected Alternatives

  • Create a new processexceptionalhandler ProcesseExceptionalHandler interface for global thread which require introducing new configuration at the stream config level. This would create unnecessary operational  operational overload for the end users as it require to implement multiple interfaces .

...