Versions Compared

Key

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

...

We propose to add a new streams specific uncaught exception handler that will do the following:

SHUTDOWN_STREAM_THREAD:

  • The current stream thread is shutdown and transits to state DEAD.

  • The Kafka Streams client transits to ERROR if no other stream thread is alive.

SHUTDOWN_KAFKA_STREAMS_CLIENT

  • All Stream Threads in the client are shutdown and they transit to state DEAD
  • The Kafka Streams client transits to state NOT_RUNNING.

  • The State directory cleaner thread stop 
  • The RocksDB metrics recording thread is not shutdown.

SHUTDOWN_KAFKA_STREAMS_APPLICATION

  • The shutdown is communicated to the other Kafka Streams clients through the rebalance protocol.

  • All Stream Threads across the entire application are shutdown and they transit to state DEAD

  • All Kafka Streams clients, i.e., the entire Kafka Streams application, is shutdown.

  • All Kafka Streams clients transit to state NOT_RUNNING. 

  • The State directory cleaner thread stop
  • The RocksDB metrics recording thread is not shutdown.

The clients will transition to state NOT_RUNNING because that is the current behavior of close.

...

The SubcriptionInfoData will be upgraded to version 8 because we are adding a field for an error code to be propagated through the application.

The pervious setUncaughtExceptionHandler will be deprecated in favor of this one.


Rejected Alternatives

  • Two paths, Internal Error via exception and a request method for users to call
  • Add a config option to shutdown when ever a user error is thrown - no flexible enough
  • Throwing an Exception instead of shutdown Application