Versions Compared

Key

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

...

Code Block
languagejava
# Two category exceptions
public class RetryableStateStoreException extends InvalidStateStoreException
public class FatalStateStoreException extends InvalidStateStoreException


# Retryable exceptions
public class StreamThreadNotStartedExceptionStreamNotStartedException extends RetryableStateStoreException
public class StreamThreadRebalancingExceptionStreamRebalancingException extends RetryableStateStoreException
public class StateStoreMigratedException extends RetryableStateStoreException


# Fatal exceptions
public class StreamNotRunningException extends FatalStateStoreException
public class StateStoreNotAvailableException extends FatalStateStoreException
public class StreamThreadNotRunningExceptionUnknownStateStoreException extends FatalStateStoreException

Various state store exceptions can classify into two category exceptions: RetryableStateStoreException and FatalStateStoreException. The user can use the two exceptions if they only need to distinguish whether it can retry.

  • Retryable exceptions
    • StreamsNStreamNotStartedException: will be thrown when streams thread state is CREATED, the user can retry until to RUNNING.
    • StreamsRebalancingExceptionStreamRebalancingException: will be thrown when stream thread is not running and stream state is REBALANCING, the user just retry and wait until rebalance finished (RUNNING).
    • StateStoreMigratedException: will be thrown when state store already closed and stream state is RUNNING. The user need to rediscover the store and cannot blindly retry as the store handle is invalid and a new store handle must be retrived.
  • Fatal exceptions
    • StreamsNotRunningExceptionStreamNotRunningException: will be thrown when stream thread is not running and stream state is PENDING_SHUTDOWN / NOT_RUNNING / ERROR. The user cannot retry when this exception is thrown.
    • StateStoreNotAvailableException: will be thrown when state store closed and stream thread is PENDING_SHUTDOWN / NOT_RUNNING / ERROR. The user cannot retry when this exception is thrown.
    • UnknownStateStoreException: will be thrown when passing an unknown state store.

...

  • KafkaStreams
    • store(storeName, queryableStoreType)
Info
Throw exceptions: StreamsNotStartedExceptionStreamNotStartedException, StreamsRebalancingException StreamRebalancingException, StreamsNotRunningException StreamNotRunningExceptionUnknownStateStoreException

...

Info

All the above methods could be throw following exceptions: 

StreamsRebalancingExceptionStreamRebalancingExceptionStateStoreMigratedException, StreamsNotRunningExceptionStreamNotRunningExceptionStateStoreNotAvailableException

...